develooper Front page | perl.perl5.porters | Postings from September 2018

Re: [perl #133547] Inconsistency in Script Run

Thread Previous | Thread Next
From:
Abigail
Date:
September 27, 2018 17:50
Subject:
Re: [perl #133547] Inconsistency in Script Run
Message ID:
20180927175108.GA15929@almanda.fritz.box
On Thu, Sep 27, 2018 at 10:04:22AM -0700, Philip Hazel (via RT) wrote:
> # New Ticket Created by  Philip Hazel 
> # Please include the string:  [perl #133547]
> # in the subject line of all future correspondence about this issue. 
> # <URL: https://rt.perl.org/Ticket/Display.html?id=133547 >
> 
> 
> From: ph10@cam.ac.uk
> To: perlbug@perl.org
> Message-Id: <5.28.0_31268_1538066218@quercite>
> Reply-To: ph10@cam.ac.uk
> Cc: builduser
> Subject: Script Run Consistency
> 
> 
> This is a bug report for perl from ph10@cam.ac.uk,
> generated with the help of perlbug 1.41 running under perl 5.28.0.
> 
> 
> -----------------------------------------------------------------
> [Please describe your issue here]
> 
> I was running some tests on the new (*script_run:...) regex feature, 
> preparatory to implementing it in PCRE. As I understand it from reading perlre, 
> the ASCII digits 0-9 should be acceptable in any script run, provided there
> aren't any other digits. There seems to be some inconsistency. Consider these 
> two examples:
> 
> $ perl -e 'if ("\x{3041}12\x{3041}" =~ /^(*sr:.{4})/) { print "yes >$&<\n"; } else { print "no \n"; }'
> yes >ぁ12ぁ<
> 
> In this example, the two ASCII digits "12" are flanked by two Hiragana
> characters; the pattern matches. This is also true for many other scripts, 
> including Greek, Cyrillic, Armenian, Hebrew, Arabic, Ethiopic, and Ogham.
> 
> $ perl -e 'if ("\x{0980}12\x{0993}" =~ /^(*sr:.{4})/) { print "yes >$&<\n"; } else { print "no \n"; }'
> no 
> 
> In this example, the two ASCII digits "12" are flanged by two Bengali 
> characters; the pattern does not match. This is also true for Thaana, Thai, 
> Khmer and Devanagari.
> 
> Why the difference? I haven't exhaustively tested all possible scripts, and I 
> haven't spotted any pattern in which ones match and which ones don't.
> 


Can you check with blead? I reported this in August, and Karl fixed
that the same day. So 5.28.0 is broken, but blead should do things
correctly.


Regards,



Abigail

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About