#24500: Django runtests - 3 tests fail on windows due to encoding troubles
-------------------------------------+-------------------------------------
     Reporter:  pakal                |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:                       |                  Version:  1.7
  Internationalization               |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by pakal):

 Thanks

 I guess that's why -> your "xgettext -V" output is all-english, so ascii-
 compatible, hence that it be treated as utf8, a windows codepage, or
 ascii, is the same for django, and no error occurs. But for non-ascii
 outputs like my french "xgettext -V", decoding breaks because the output
 of Popen is cp1252 with accentuated letters, not utf8.

 So we should replace "stdout = stdout.decode('utf-8')" by a proper
 operation with DEFAULT_LOCALE_ENCODING. I don't know what's best -
 normalize everything at popen_wrapper level (but it might break lots of
 code that rely on raw DEFAULT_LOCALE_ENCODING bytes), or handle stuffs
 properly in the new gettext_popen_wrapper() ? The latter i guess ?

 Note that django1.7 didn't have these things, so no tests broke.

 When was know the way to go, I can draft a patch to solve that non-ascii-
 encoding buglet.

--
Ticket URL: <https://code.djangoproject.com/ticket/24500#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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.7547a84b464d0b529718e8313f0c0c36%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to