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 r.david.murray
Recipients Michael.Kuss, ezio.melotti, r.david.murray, vstinner
Date 2014-10-22.19:39:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1414006774.99.0.721117135515.issue22701@psf.upfronthosting.co.za>
In-reply-to
Content
If I fix your example so it runs:

json.dump({'name': "港区"}, open('myfile.json', 'w'), indent=4, separators=(',', ': '), ensure_ascii=False)

I get the expected output:

rdmurray@pydev:~/python/p34>cat myfile.json 
{
    "name": "港区"
}

That example won't work in python2, of course, so you'd have to show us your actual code there.
History
Date User Action Args
2014-10-22 19:39:35r.david.murraysetrecipients: + r.david.murray, vstinner, ezio.melotti, Michael.Kuss
2014-10-22 19:39:34r.david.murraysetmessageid: <1414006774.99.0.721117135515.issue22701@psf.upfronthosting.co.za>
2014-10-22 19:39:34r.david.murraylinkissue22701 messages
2014-10-22 19:39:34r.david.murraycreate