Open GoogleCodeExporter opened 9 years ago
Django in the 1.0 documentation specifies that you should use UTF-8 (or
UTF-16?) for
your database.
Original comment by v.oostv...@gmail.com
on 12 Sep 2008 at 1:58
Original comment by doug.nap...@gmail.com
on 12 Sep 2008 at 2:52
The point is we should be using the django safe_str() calls and the like to
convert
the strings before printing. Not sure what to do when the terminal supports the
printing of other charsets, (but I believe the underlying python print
mechanism will
still crash trying to treat the string as ascii-7).
in short:
print Model.field # BAD
print safe_str(Model.field) # GOOD
raise Exception(Model.field) # BAD
raise Exception(safe_str(Model.field) #GOOD
It's a 2 second fix, will try to get to it soon.
Original comment by doug.nap...@gmail.com
on 12 Sep 2008 at 2:58
Otherwise i will do it.
Also we might try and see if we should either change more commands that output
user
input / unicode input on the cli with a safe_str wrapper or maybe provide our
own
safe_print in django_extensions.utils
FYI: Some similar/related discussion in ticket:
http://code.google.com/p/django-command-extensions/issues/detail?id=12&can=1
Original comment by v.oostv...@gmail.com
on 12 Sep 2008 at 4:35
Original comment by v.oostv...@gmail.com
on 12 Sep 2008 at 4:35
Original issue reported on code.google.com by
doug.nap...@gmail.com
on 3 Jun 2008 at 1:10