Opened 4 years ago
Last modified 4 years ago
#32080 closed Bug
admin can't display Chinese normally when a JsonField contains Chinese — at Version 1
Reported by: | ZhaoQi99 | Owned by: | nobody |
---|---|---|---|
Component: | Forms | Version: | 3.1 |
Severity: | Release blocker | Keywords: | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | yes |
Description (last modified by )
>>> import json >>> print json.dumps('中国') "\u4e2d\u56fd"
json.dumps
use ASCII encoding by default when serializing Chinese.
So when we edit a JsonField
which contains Chinese character in Django admin,it will appear in ASCII characters.
I have try to fix this this problem in https://github.com/adamchainz/django-mysql/pull/714.And it works prefectly.
Note:
See TracTickets
for help on using tickets.