#22399: loaddata doesn't work correctly when importing utf-8 encoded files --------------------------------------------+---------------------------- Reporter: bacilla | Owner: nobody Type: Bug | Status: new Component: Core (Management commands) | Version: 1.6 Severity: Normal | Keywords: loaddata utf-8 Triage Stage: Unreviewed | Has patch: 0 Easy pickings: 0 | UI/UX: 0 --------------------------------------------+---------------------------- Environment: Windows 7, Python 3.3, Django 1.6.2, PyYAML 3.11
When initializing DB with a yaml fixture that contains russian characters, like this: {{{ - model: testapp.City fields: name: Санкт-Петербург }}} or unicode escaped sequences, like this: {{{ - model: testapp.City fields: name: "\u040c\u00ae\u045e\u00ae\u0431\u0401\u040e\u0401\u0430\u0431\u0404" }}} in a 'name' column appears garbage. It seems that this happens because a fixture file doesn't properly opened in utf-8 encoding, line 122 of the source file 'django/core/management/commands/loaddata.py' (missing parameter 'encoding="utf-8"'). Python discussions there: https://mail.python.org/pipermail/python-ideas/2013-June/021230.html -- Ticket URL: <https://code.djangoproject.com/ticket/22399> 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 unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/050.c2a263582bd8683eef35387e1063590e%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.