mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #15296: Fix minidom.toxml/toprettyxml for non-unicode encodings. Patch by Serhiy Storchaka, with some minor style adjustments by me.
This commit is contained in:
parent
b674dcf53e
commit
8a80502d2c
3 changed files with 18 additions and 16 deletions
|
@ -147,12 +147,7 @@ module documentation. This section lists the differences between the API and
|
|||
the DOM node.
|
||||
|
||||
With an explicit *encoding* [1]_ argument, the result is a byte
|
||||
string in the specified encoding. It is recommended that you
|
||||
always specify an encoding; you may use any encoding you like, but
|
||||
an argument of "utf-8" is the most common choice, avoiding
|
||||
:exc:`UnicodeError` exceptions in case of unrepresentable text
|
||||
data.
|
||||
|
||||
string in the specified encoding.
|
||||
With no *encoding* argument, the result is a Unicode string, and the
|
||||
XML declaration in the resulting string does not specify an
|
||||
encoding. Encoding this string in an encoding other than UTF-8 is
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue