Serialization with JSON and UTF-8, "ensure_ascii=False" invalid now?
|Reported by:||Owned by:||nobody|
|Severity:||Normal||Keywords:||json ensure_ascii utf-8 utf8|
|Cc:||Sindre Sorhus||Triage Stage:||Accepted|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
The bottom of page:
says for JSON you should specify:
This appears not to be the case, as latest trunk actually generates an exception when a unicode character is hit with "ensure_ascii=False". This seems to be two problems depending on your perspective, but I'm not sure how to tackle this.
(1) Removing the ensure_ascii parameter allows the serializer to generate UTF-8 encoded characters. (consequence of UTF-8 branch merge?)
(2) Documentation tells you to do something that actually generates an exception.
Change History (8)
comment:1 Changed 9 years ago by
|Patch needs improvement:||unset|