develooper Front page | perl.perl5.porters | Postings from December 2010

Re: [perl #80030] Matching upper ASCII characters from file in RE patterns

Thread Previous | Thread Next
December 11, 2010 23:23
Re: [perl #80030] Matching upper ASCII characters from file in RE patterns
Message ID:

On Sat, 11 Dec 2010 14:43:16 +0100
demerphq <> wrote:

> On 9 December 2010 08:16, Eric Brine <> wrote:
> > The effect of "use encoding" on \x escapes in literals and the like is why
> > some people avoid "use encoding".
> Yes, for many including me, it seems rather insane, I guess for some
> it makes sense, but I really wish they had picked a different escape
> to use than remapping \x{}.

Dan kogai, the maintainer of Encode including, said in his blog
entitled "404 Blog Not Found",

  - The encoding pragma has been originally developped for the purpose
    of the transition from localized perl scripts such as jperl (japanized
    perl) to perl 5.8.
    "Use encoding 'UTF-8'" is beyond the scope of its purpose.
    "Use utf8" is enough to write perl codes in UTF-8.

    at 19:15, 22 June 2007
   perl - no encoding; # whenever possible
   (in Japanese)

  - "Use encoding;" should be used only when you need to rewrite
    an old code to run under a newer perl.

   at 14:30, 08 June 2009
   perl - use encoding; # WA KURO REKISHI
   (translation: perl - use encoding; # is a black history)
   (in Japanese)

If he had intended mainly for the purpose to make
porting localized codes from byte semantics to unicode semantics
more easily, it would make sense that automatically
converts not only raw literals but also metacharacters such as \xHH,
that have been used earlier than 5.6.


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