This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author zhou.ronghua
Recipients zhou.ronghua
Date 2018-05-29.14:29:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1527604179.28.0.682650639539.issue33684@psf.upfronthosting.co.za>
In-reply-to
Content
when type this command in windows(xp or win7, all the same):
python -m json.tool xxx.txt xxx.json
if xxx.txt contains Chinese(or other multibytes characters):
if xxx.txt is encoded in ansi, xxx.json will encode Chinese as \xxx, very bad to see what they are;
if xxx.txt is encoded in utf8(without bom for most of the time), because with no bom, json.tool will think it is encoded in ansi, and decode fail.

as now, utf8 is widely use, set default to utf8 for most of the time when auto detect encoding failed
History
Date User Action Args
2018-05-29 14:29:39zhou.ronghuasetrecipients: + zhou.ronghua
2018-05-29 14:29:39zhou.ronghuasetmessageid: <1527604179.28.0.682650639539.issue33684@psf.upfronthosting.co.za>
2018-05-29 14:29:39zhou.ronghualinkissue33684 messages
2018-05-29 14:29:39zhou.ronghuacreate