[I18n-sig] Strawman Proposal (2): Encoding attributes

M.-A. Lemburg mal@lemburg.com
Sat, 10 Feb 2001 23:20:05 +0100


Paul Prescod wrote:
> 
> "M.-A. Lemburg" wrote:
> >
> > > ...
> >
> > We could agree on this though:
> >
> > 1. programs which do not use the encoding declaration are free
> >    to use non-ASCII bytes in literals; Unicode literals must
> >    use Latin-1 (for historic reasons)
> >
> > 2. programs which do make use of the encoding declaration may
> >    only use non-ASCII bytes in Unicode literals; these are then
> >    interpreted using the given encoding information and decoded
> >    into Unicode during the compilation step
> 
> I thought that's what I suggested! I am comfortable with that design.

Well, not quite since 2. doesn't decode the whole file, but only
the Unicode literals. The restriction on the rest of the file could
be made a convention or be actually checked to assure forward
compatibility.

-- 
Marc-Andre Lemburg
______________________________________________________________________
Company:                                        http://www.egenix.com/
Consulting:                                    http://www.lemburg.com/
Python Pages:                           http://www.lemburg.com/python/