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

Comment (by pakal):

 Yes I tried it, but it broke other assumptions (especially tests dedicated
 to verify real file encoding troubles).

 Furthermore, I'm afraid it might lead to new cases of mojibake, since an
 ANSI (ex. latin1) string might, by error, be treated as an utf8 string
 (and thus unexpected unicode characters be formed by grouping together 2
 our more single-byte characters). Most of the time we get "invalid
 continuation byte" in such cases, but if one has bad luck....

 I guess our best chance is to bet on empirical evidence, and assume that
 xgettext tools '''always''' return utf-8 strings, '''unless''' when called
 for side tasks like displaying version info. As long as tests pass on both
 *nix and windows, python2 and python3, on non-english computers, i'm
 rather confident about the robustness of this solution (test coverage is
 pretty strong on these i18n encoding troubles).

--
Ticket URL: <https://code.djangoproject.com/ticket/24500#comment:10>
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/063.7cf5b2f78f408f7b075102664c47622e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to