Code

Changes between Initial Version and Version 1 of Ticket #19098, comment 4


Ignore:
Timestamp:
10/10/12 10:55:18 (19 months ago)
Author:
artamoshin
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #19098, comment 4

    initial v1  
    11Replying to [comment:3 claudep]: 
    22> Still in master, I see another way: do not call `repr()` on `self.urlconf_name` (which should be a proper unicode string). Can you test that? 
    3 Formatting `u'%s' % self.urlconf_name` anyway call `repr()` implicitly. Python (at least 2.7) `repr(module)` always return __bytestring__ (not Unicode) like `<module 'modulename' from 'non/ascii/path/modulename.py'>`, which may contains codes >127. Next, implicit decoding while formatting using 'ascii' codec, that raises UnicodeDecodeError because it doesn't know what to do with that codes. 
     3Formatting `u'%s' % self.urlconf_name` anyway call `repr()` implicitly. Python (at least 2.7) `repr(module)` always return __bytestring__ (not Unicode) like `<module 'modulename' from 'non/ascii/path/modulename.py'>`, which may contains codes >127. Next, implicit decoding while formatting uses 'ascii' codec, that raises UnicodeDecodeError because it doesn't know what to do with that codes.