dumpdata cannot support utf-8 encoding in mysql5.5
|Reported by:||Owned by:||nobody|
|Component:||Core (Management commands)||Version:||1.4|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
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.