How to ask sax for the file encoding

Irmen de Jong irmen.NOSPAM at
Wed Oct 4 19:49:59 CEST 2006

Edward K. Ream wrote:

> What suits me best is what the *user* specified, and that got put in the 
> first xml line.
> I'm going to have to parse this line myself.

Please consider adding some elements to the document itself that
describe the desired output format, such as:


This allows the client to specify the encoding it wants to receive
the document in, even if it's different than the encoding it used
to make the first document. More flexibility. Less fooling around.


More information about the Python-list mailing list