[XML-SIG] PyExpat encoding

Paul Prescod paul@prescod.net
Thu, 01 Jun 2000 21:57:48 -0500


tpassin@home.com wrote:
> 
> With all the talk about default encodings, compiling for different
> encodings, and passing "unicode" to Python objects, I'm losing track -or my
> grip :) -.  Do these considerations affect either pyexpat or other python
> XML code in their ability to handle the basic required encodings, per the
> XML 1.0 Rec:

No, Expat is great at reading multiple encodings on input. The question
is what you get on output. Basically, we can compile it to give us 8-bit
or 16-bit output. 8-bit is expat's default (which is why it is Greg's
preference). 16-bit is Python's default (which is why it is my
preference).

I mean if Python has a Unicode object and we choose to encode Unicode
text in hacked-up 8-bit strings then I think that there is something
seriously awry somewhere in the system.

-- 
 Paul Prescod  - ISOGEN Consulting Engineer speaking for himself
Simplicity does not precede complexity, but follows it.
        - http://www.cs.yale.edu/~perlis-alan/quotes.html