#32439: Dumpdata fails on Windows due to non-utf8 system locale
-------------------------------------+-------------------------------------
     Reporter:  helmstedt            |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Uncategorized        |                  Version:  3.1
     Severity:  Normal               |               Resolution:
     Keywords:  windows, utf8,       |             Triage Stage:
  encoding, dumpdata                 |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by helmstedt):

 Replying to [comment:4 David Smith]:
 > Duplicate of #26721?

 Maybe both have two do with encodings on Windows, but the behavior
 described in that issue is different, since the dump is actually created,
 but with wrong encoding (if I understand it correctly). In my case the
 dump file is only written until the character before the non-supported
 character. Also, when comparing my traceback to the traceback from
 https://groups.google.com/forum/#!topic/django-
 users/NAHD058Gh_Q/discussion, it does seem like two different issues.

 I'm not a Python or Django expert by any means, but as you can see from
 the end of my traceback...

   File
 
"C:\Users\Morten\AppData\Local\Programs\Python\Python38\lib\encodings\cp1252.py",
 line 19, in encode
   return codecs.charmap_encode(input,self.errors,encoding_table)[0]

 Django uses a wrong Python encoding library for the utf8 database, because
 it assumes the encoding set in Windows is the right one to use.

 But if I am right that Windows will never have utf8 set as a default
 locale, Django should provide a way to override the default locale
 encoding and set utf8 instead.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32439#comment:5>
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.8c88294b77f5a0bc8c8a6c7d856246d1%40djangoproject.com.

Reply via email to