perl-i18n

Re: Questions About Encoding

2003-05-11 14:21:18
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  sburke(_at_)cpan(_dot_)org  http://search.cpan.org/~sburke/



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