perl-unicode

Re: Unicode aware module

1999-06-13 10:23:43
On 13 Jun 1999 09:04:36 PDT, Russ Allbery wrote:
Seems to me like either way of dealing with UTF8 is going to result in
potential bugs.  If we allow a global pragma, some modules will continue
to work fine with it set and others will be doing byte-level things in
regexes and other places and die badly.  If we require each module to
declare its UTF8-awareness, then the ones that do will probably work fine
but most never will and your UTF8 data may have odd things happen to it
when it comes anywhere near those modules.

Which is the reason why I think there should be some mechanism to
elicit warnings when those unexpected things happen.  I see no way
to get those warnings without tagging the data in some way.

There does exist one reliable, but impractical solution: croak
when a module that gets loaded under C<use utf8 ':global'>
doesn't have either C<use caller 'encoding'> or C<use/no utf8>.

I find myself wanting some clear idea of how much stuff can potentially
break if a routine not written with use utf8 in mind suddenly finds itself
operating in that environment.

I imagine in 99% of the cases, nothing will break.  The remaining 1%
is the problem (and we currently don't have a way to know what bit
you).


Sarathy
gsar(_at_)activestate(_dot_)com

<Prev in Thread] Current Thread [Next in Thread>