in reply to Locale and Unicode, enemies in perl?
Where comes the conflict with locales from?There are many aspects to locale, but one of them is a mapping of integers to characters. But that's what Unicode does as well: in its heart, it maps integers to characters.
Perl strings are a little bit more sophisticated than C strings, but all this sophistication is only on a technical level. But Perl strings are still pretty dumb: they're a sequence of integers.
The problem comes when we consider a string that doesn't have the UTF-8 flag set (which is not only used internally - to tell how the integers mentioned above are encoded in bytes, but it's also signalling Unicode semantics apply). Suppose one of the integers of the string is 0xDF. Which character is it? Is it a letter? A number? Something else?
Do I miss something in my understanding?Experts consider locale-support to be broken in Perl. Some of them are itching to declare them deprecated. Bugs are considered to complicated to fix.
If you think there's an easy fix to get things working better than they are now, I'd think p5p would be quite interested in your patches.
|
|---|