Thursday, March 3, 2011

Re: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in position 0: ordinal not in range(128)

On Thu, Mar 3, 2011 at 8:57 AM, Perses Titan <perses76@gmail.com> wrote:
In your case, most probably django crashs when it reads nonASCII
characters from DB.


No. The posted traceback clearly shows where the error is occurring and it is nowhere in Django. As I posted earlier it looks like a bug in the Python library. I'd also guess it is new with Python 2.7 since I cannot recall seeing this problem posted before Python 2.7 came out. The right place to pursue this particular problem is in the Python bug tracker -- for all I know it has already been noted and fixed, I have not attempted to track it down from that side.

Django fully supports non-ASCII data in the database, in template files, dynamically generated by application code. (Your application, of course, must ALSO be coded to properly handled non-ASCII data.)

Posting that Django probably crashed when reading non-ASCII data from the database is misleading and in this case where the traceback was posted flat-out wrong.

Karen
--
http://tracey.org/kmt/

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment