develooper Front page | perl.perl5.porters | Postings from July 2012

Re: [perl #89032] utf8-bracket support

Thread Next
Linda W
July 12, 2012 20:14
Re: [perl #89032] utf8-bracket support
Message ID:
I'd like to point out something -- and that is that while this is called 
the "utf8-bracket" support,

Due to perl's buggy  handling of the characters in range 0x80-0xff 
(usually, euphemistically,
called "the unicode bug"),  -- they are treated the same in various 
contexts, as 0x00-0x7f.

As such, there is already a pair of characters in that range, in unicode 
OR in latin1 (perl's alternate
default for that range), that are candidates for being delimiters that 
should be included ASAP,
regardless of the "use unicode brackets" feature, as they ARE 
specifically called left and
right quotation marks 0xab + 0xbb (« + »  ) That they can't be used as 
such is a real pain,
since as this perl manpage points out:

     Note, however, that this does not always work for quoting Perl code:
           $s = q{ if($a eq "}") ... }; # WRONG
       is a syntax error.

In fact, it's impossible without resorting to special modules, like 
to quote perl code.  So it would be more than nice if the existing quotation
marks in the latin1 set that perl already supports would be usable
as L+R quotes regardless of the larger unicode question.

maybe a patch or maint release in 5.14 or 5.16?...

The beauty of them is they are not perl operators, so they could safely
be used to quote perl code  and I doubt they are in use for any purpose
now except in strings, and then only if unicode is enabled.

Would those be reasonable for 'fast tracking'?

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About