[I18n-sig] Re: Unicode debate

Sin Hang Kin kentsin@poboxes.com
Sat, 29 Apr 2000 11:07:06 +0800


For python source, we would enforce all to write in utf-8. Provided  that
they would freely choose their own natively encoding if they wish, but to
convert them to unicode if they publish them.

Rgs,

Kent Sin
----- Original Message -----
From: "Just van Rossum" <just@letterror.com>
To: "Guido van Rossum" <guido@python.org>; <python-dev@python.org>;
<i18n-sig@python.org>
Sent: Friday, April 28, 2000 4:33 PM
Subject: [I18n-sig] Re: Unicode debate


> At 11:01 AM -0400 27-04-2000, Guido van Rossum wrote:
> >Where does the current approach require work?
> >
> >- We need a way to indicate the encoding of Python source code.
> >(Probably a "magic comment".)
>
> How will other parts of a program know which encoding was used for
> non-unicode string literals?
>
> It seems to me that an encoding attribute for 8-bit strings solves this
> nicely. The attribute should only be set automatically if the encoding of
> the source file was specified or when the string has been encoded from a
> unicode string. The attribute should *only* be used when converting to
> unicode. (Hm, it could even be used when calling unicode() without the
> encoding argument.) It should *not* be used when comparing (or adding,
> etc.) 8-bit strings to each other, since they still may contain binary
> goop, even in a source file with a specified encoding!
>
> >- We need a way to indicate the encoding of input and output data
> >files, and we need shortcuts to set the encoding of stdin, stdout and
> >stderr (and maybe all files opened without an explicit encoding).
>
> Can you open a file *with* an explicit encoding?
>
> Just
>
>
>
> _______________________________________________
> I18n-sig mailing list
> I18n-sig@python.org
> http://www.python.org/mailman/listinfo/i18n-sig
>