#19194: dumpdata cannot support utf-8 encoding in mysql5.5 --------------------------------------------+---------------------- Reporter: tony.li@… | Owner: nobody Type: Bug | Status: new Component: Core (Management commands) | Version: 1.4 Severity: Normal | Keywords: dumpdata Triage Stage: Unreviewed | Has patch: 0 Easy pickings: 0 | UI/UX: 0 --------------------------------------------+---------------------- I have tried using dumpdata to get testing data for unit testing, When I load the .json / xml fixture files inside the test.py, the console always prompt warning about the incorrect string value
Warning: Incorrect string value: '\xE7\x94\xB7\xE8\xA3\x9D' for column 'DIS_NAME' at row 1 when I try assertEqual the value, they only found a '?' char, which I think the database did not get the parsing correct at the very beginning. ps. The 'DIS_NAME' is in chinese and so I tried decode and encode back shown in http://stackoverflow.com/questions/2137501/django-dumpdata-utf-8-unicode, it show me : DeserializationError: Invalid control character at: line 1 column 4793 (char 4793) The production or dev sever are running with no problem... it just happen in unit test fixture. -- Ticket URL: <https://code.djangoproject.com/ticket/19194> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.