Re: Questions About Encoding

[email protected] ("Sean M. Burke") Sun, 11 May 2003 13:19:50 -0800
Newsgroups perl.i18n
Message-ID <[email protected]>
At 5/12/2003 02:21 AM +0800, imacat wrote:
>     The Locale::Maketext functions are not mult-byte safe, as some of you 
> may have noticed.  It is not safe to the Traditional Chinese Big5 
> encoding.  Big5 has some characters that contains "]" or "[" as their 
> second byte, which cannot (and should not) be escaped in the middle of a 
> full character.  (Otherwise the character will break in half.)

Back when I first put together Locale::Maketext (five years ago now?) I was 
sort of hoping that, in time, I wouldn't have to think about such things, 
because everyone would be using Unicode for everything -- but that 
definitely hasn't happened!
When I chose "[" and "]" as magic characters, I think I was dimly aware 
that those could come up in a Japanese encoding or two, but I didn't know 
about the general case of multibyte encodings that can consist of arbtrary 
bytes under 0x80.

Anyway, I defer to people with experience on these things to come up with 
suggestions on what to do.

(But remember, anything is possible with a bit of overriding of the 
internal methods in Maketext.pm!)


--
Sean M. Burke  [email protected]  http://search.cpan.org/~sburke/