[Python-Dev] Unicode and XML

M.-A. Lemburg mal@lemburg.com
Tue, 18 Apr 2000 00:10:12 +0200


Paul Prescod wrote:
> 
> Let's presume that we agreed that XML is not a language because it
> doesn't have semantics. What does that have to do with the applicability
> of its Unicode-handling model?
> 
> Here is a list of a hundred specifications which we can probably agree
> have "useful semantics" that are all based on XML and thus have the same
> Unicode model:
> 
> http://www.xml.org/xmlorg_registry/index.shtml
> 
> XML's unicode model seems mostly appropriate to me. I can only see one
> reason it might not apply: which comes first the #! line or the
> #encoding line? We could say that the #! line can only be used in
> encodings that are direct supersets of ASCII (e.g. UTF-8 but not
> UTF-16). That shouldnt' cause any problems with Unix because as far as I
> know, Unix can only read the first line if it is in an ASCII superset
> anyhow!
> 
> Then the second line could describe the precise ASCII superset in use
> (8859-1, 8859-2, UTF-8, raw ASCII, etc.).

Sounds like a good idea... how would such a line look like ?

#!/usr/bin/env python
# version: 1.6, encoding: iso-8859-1
...

Meaning: the module script needs Python version >=1.6 and uses
iso-8859-1 as source file encoding.

-- 
Marc-Andre Lemburg
______________________________________________________________________
Business:                                      http://www.lemburg.com/
Python Pages:                           http://www.lemburg.com/python/