develooper Front page | perl.perl5.porters | Postings from February 2008

Re: use encoding 'utf8' bug for Latin-1 range

Thread Previous | Thread Next
From:
Juerd Waalboer
Date:
February 21, 2008 02:53
Subject:
Re: use encoding 'utf8' bug for Latin-1 range
Message ID:
20080221105113.GA32395@c4.convolution.nl
Rafael Garcia-Suarez skribis 2008-02-21 11:34 (+0100):
> I agree with that plan. However, we have some useful code out there, and
> in the core, that uses ${^ENCODING}: notably the encoding::warnings
> module.

Just to put this in perspective: encoding::warnings is a debugging tool
and generally a bad idea in production code, IMHO.

> That's why fixing the calling steps of ${^ENCODING} methods might be
> worthwhile after all. So, no deprecation of ${^ENCODING} for now.

That will, however, break existing code using encoding.pm, or
encoding::source. Unless I'm mistaken, it's ${^ENCODING} that handles
the weird behaviour for \x and chr.

If this backwards incompatibility is ruled unimportant, the general
assumption would be: ${^ENCODING} acts on literal source code only, and
the fix would be to make numeric character values always unicode
codepoints. Is this correct?
-- 
Met vriendelijke groet,  Kind regards,  Korajn salutojn,

  Juerd Waalboer:  Perl hacker  <#####@juerd.nl>  <http://juerd.nl/sig>
  Convolution:     ICT solutions and consultancy <sales@convolution.nl>

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