[I18n-sig] Re: Strawman Proposal (2): Encoding attributes
M.-A. Lemburg
mal@lemburg.com
Sun, 11 Feb 2001 19:33:19 +0100
Fredrik Lundh wrote:
>
> > > > Ah, ok. The encoding information will only be applied to literal
> > > > Unicode strings (u"text"), right ?
> > >
> > > No, that's very different than what I am suggesting.
> > >
> > > The encoding is applied to the *text file*.
> >
> > -1
>
> and -1 on your -1.
>
> MAL, you're stuck in a "unicode strings are something special" modus
> operandi. the goal should be to get rid of u"foo" strings, not continue
> to make Python more and more dependent on this artificial distinction.
Unicode strings *are* special: they can only be used for text data.
I we were to decode the whole source code file using some encoding,
then use of binary data in standard ""-literals could and probably
would lead to decoding errors.
Some encodings even play with ASCII-characters (just take a look at
the codecs in encodings/), so these would break standard program
text as well.
> > The result would be way to much breakage.
>
> I doubt it.
Anyway, the two bullets I suggested on this thread implement a
subset of what you (Paul and Fredrik) have in mind, so I believe
it's a good compromise.
We can always extend this to full text file decoding at some
later stage, if that should become necessary, which I doubt ;-)
--
Marc-Andre Lemburg
______________________________________________________________________
Company: http://www.egenix.com/
Consulting: http://www.lemburg.com/
Python Pages: http://www.lemburg.com/python/