You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 28, 2023. It is now read-only.
What steps will reproduce the problem?
1. use wad serializer in Py2.7 and Dj1.3, serializing model with e.g. field
'name' which has value that is beyond ascii (e.g. name = u'täst'), have
ensure_ascii=False
2. When serializing (ensure_ascii=False) you then get 'ascii' codec can't
encode characters in position 9-10: ordinal not in range(128) in self.end and
doing simplejson.dump
3. poof...
What is the expected output?
Was expecting to see field correctly encoded in json string in UTF-8. u'täst'
should be 't\xc3\xa4st'
What do you see instead?
It is a normal python unicode string e.g. u'täst' or u't\xe4st', this is not UTF-8 so the error is correct but wrong ;-)
What version of the product are you using? On what operating system? Mac
10.7.2, Py2.7, Django 1.3
Please provide any additional information below.
Did set ensure_ascii to True, then it returns correctly but the resulting JSON
shown has name=u't\xe4st', i.e. the string is not utf-8 encoded.
Original issue reported on code.google.com by [email protected] on 14 Nov 2011 at 8:34
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
[email protected]
on 14 Nov 2011 at 8:34The text was updated successfully, but these errors were encountered: