Re: Locales: An Analysis
[email protected] (Larry Wall) Fri, 4 Feb 2000 10:33:04 -0800 (PST)
| Newsgroups | perl.perl5.porters,perl.perl6.porters |
|---|---|
| Message-ID | <[email protected]> |
Ilya Zakharevich writes:
: On Fri, Feb 04, 2000 at 12:12:25AM -0800, Chip Salzenberg wrote:
: > > > So: The _string_encoding_ state of each OP must be one of these:
: > > > 0. the default -- follow each string's current encoding
: > > > 1. "use byte" -- all strings are one-byte
: > > > 2. "use utf8" -- all strings are UTF-8 (*not* necessarily Unicode!)
: > > >
: > > > And the _character_set_ state of each OP must one of these:
: > > > 0. the default -- characters are Latin-1, UTF-8 is Unicode
: > > > 1. "use locale" -- characters are $ENV{LANG} (set at runtime)
: > >
: > > Too complicated
: >
: > For users, or for us?
:
: This is an interesting question indeed. For us: definitely. But for
: users? Maybe too... Anyone having ideas?
Perl made the non-mistake of waiting to get invented until the IEEE
standardized floating point. I think it should also make the non-mistake
of using the emerging UTF-8 bandwagon as the lens through which to
view legacy character sets. I believe this is a place where Perl should
strive to make things as simple as possible for the programmer, but no
simpler. If we can move the complexity to the interfaces rather than
to the opcodes, Perl stays conceptually cleaner. Then as the interfaces
of the world converge on UTF-8, Perl's interfaces become cleaner.
That being said, as Tim pointed out, a large portion of the world is
slightly discriminated against by UTF-8, and may settle on UTF-16 for
their own internal communications, even if international traffic tends
to settle on UTF-8. If that comes to pass, we can make a version of
Perl for those countries that swaps out the UTF-8 implementation for
something else, and as long as the interfaces are well specified, we
can do it transparently, more or less.
But I think we should be prepared for a long period in which the
internal communications are done in the legacy character set, and
international in UTF-8. There's not much psychological reason for
people to switch from one 16-bit character set to another, actually.
Larry