#21458: Encoding error on /jsi18n/?language=ü
-------------------------------------+-------------------------------------
     Reporter:  Sergey Sorokin       |      Owner:  nobody
  <40inss@…>                         |     Status:  new
         Type:  Bug                  |    Version:  1.6
    Component:                       |   Keywords:  UnicodeEncodeError,
  Internationalization               |  i18n, jsi18n
     Severity:  Normal               |  Has patch:  0
 Triage Stage:  Unreviewed           |      UI/UX:  0
Easy pickings:  0                    |
-------------------------------------+-------------------------------------
 When I pass utf-8 symbols in url /jsi18n/?language=ü, I get error:

 {{{
 UnicodeEncodeError at /jsi18n/
 'ascii' codec can't encode character u'\xfc' in position 0: ordinal not in
 range(128)
 }}}

 There is the similar error (django 1.6,
 django/utils/translation/trans_real.py, line 357), when I try to pass
 encoded symbols: /jsi18n/?language=%00%27:
 {{{
 TypeError at /jsi18n/
 must be encoded string without NULL bytes, not unicode
 }}}

 It's better to catch this exception and do not throw HTTP 500 error.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/21458>
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/076.c17e2d440684d319e65958ea70ac6286%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to