[Python-Dev] UCS2/UCS4 default

Guido van Rossum guido at python.org
Wed Jul 2 19:08:01 CEST 2008


I think we should continue to leave this up to the distribution. AFAIK
many Linux distros already use UCS4 for everything anyway.

The alternative (no matter what the configure flag is called) is
UTF-16, not UCS-2 though: there is support for surrogate pairs in
various places, including the \U escape and the UTF-8 codec.

I don't want to rule out UTF-16 as internal representation from the
Python language spec, because JVM- and .NET-based implementations
pretty much have no choice in the matter if they want to be compatible
with the native string type (which is very important for performance
and compatibility with other languages on those platforms).

For that reason I think it's also better that the configure script
continues to default to UTF-16 -- this will give the UTF-16 support
code the necessary exercise. (It is mostly a superset of the UCS-4
support code, so I'm less worried about the latter getting enough
exercise.)

--Guido

On Wed, Jul 2, 2008 at 7:13 AM, Jeroen Ruigrok van der Werven
<asmodai at in-nomine.org> wrote:
>
> Guido (and others of course),
>
> back in 2001 you pointed out that you wanted to move to UCS4 completely as
> the ideal situation
> (http://mail.python.org/pipermail/i18n-sig/2001-June/001107.html) over the
> current default UCS2.
>
> Given 3.0 will use Unicode strings as the default, would it also not make
> sense to make the switch at this point as well?
>
> The current situation with UCS2 is particularly bad now that the CJK
> ideographs Extension B. has been produced (and C is under ballot and D is
> under development).
>
> Personally I use nothing else but UCS4 compiled Python binaries for the past
> years.
>
> See also http://www.python.org/dev/peps/pep-0261/ for background for the
> 2001 options.
>
> --
> Jeroen Ruigrok van der Werven <asmodai(-at-)in-nomine.org> / asmodai
> イェルーン ラウフロック ヴァン デル ウェルヴェン
> http://www.in-nomine.org/ | http://www.rangaku.org/ | GPG: 2EAC625B
> Expansion of happiness is the purpose of life...
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: http://mail.python.org/mailman/options/python-dev/guido%40python.org



--
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-Dev mailing list