On Wed, Nov 02, 2005 at 03:06:05PM -0500, Desilets, Alain <[EMAIL PROTECTED]> wrote a message of 22 lines which said:
> But unfortunately, > dumps() generates XML code that uses the default encoding, i.e. the XML > string starts with: > > <?xml version="1.0" ?> > > How can I make dumps() generate XML that uses the UTF-8 encoding. Why? UTF-8 is the default, it seems. http://www.w3.org/TR/2004/REC-xml-20040204/ 2.8 Prolog and Document Type Declaration In the absence of information provided by an external transport protocol (e.g. HTTP or MIME), it is a fatal error for an entity including an encoding declaration to be presented to the XML processor in an encoding other than that named in the declaration, or for an entity which begins with neither a Byte Order Mark nor an encoding declaration to use an encoding other than UTF-8. Note that since ASCII is a subset of UTF-8, ordinary ASCII entities do not strictly need an encoding declaration. _______________________________________________ XML-SIG maillist - XML-SIG@python.org http://mail.python.org/mailman/listinfo/xml-sig