On Mon, Feb 9, 2009 at 11:27 AM, Scott <scott....@gmail.com> wrote:

>
> Hello,
>
> I'm receiving the following error while running Django 0.96 with
> Google App Engine:
>
> UnicodeDecodeError at /
> 'ascii' codec can't decode byte 0xe3 in position 0: ordinal not in
> range(128)
>
> GET
> Request URL:    http://localhost:8080/
> Exception Type:         UnicodeDecodeError
> Exception Value:        'ascii' codec can't decode byte 0xe3 in position 0:
> ordinal not in range(128)
> Exception Location:     C:\Python25\lib\gettext.py in gettext, line 352
>
> Traceback (most recent call last):
> File "C:\Program Files\Google\google_appengine\lib\django\django
> \template\__init__.py" in render_node
>  723. result = node.render(context)
> File "C:\Program Files\Google\google_appengine\lib\django\django
> \templatetags\i18n.py" in render
>  43. return translation.gettext(value)
> File "C:\Program Files\Google\google_appengine\lib\django\django\utils
> \translation\trans_real.py" in gettext
>  265. return t.gettext(message)
> File "C:\Python25\lib\gettext.py" in gettext
>  352. return tmsg.encode(self._output_charset)
>
>  UnicodeDecodeError at /
>  'ascii' codec can't decode byte 0xe3 in position 0: ordinal not in
> range(128)
>
> I have the following parameters set:
>
> DEFAULT_CHARSET = 'utf-8'
> FILE_CHARSET = 'utf-8'
>
> Also, I have the following meta tag included in the page:
>
> <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
>
> From what I understand, Django will always use Unicode, so I'm a
> little confused as to why it's trying to use an ASCII codec to display
> the UTF-8 characters for the translations.
>
> Any ideas? The translation files are working for the non-unicode
> languages, but failing for all UTF-8 based languages. Could it be
> something with the .po files being created incorrectly?
> >
>
Django only handles everything as unicode post the unicode branch merge,
this happened between .96-1.0.  That is to say on .96 Django doesn't handle
things as unicode.  I'm not entirely sure what that entailed, but it occured
for a reason so I wouldn't expect that to work.

Alex

-- 
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
"The people's good is the highest law."--Cicero

--~--~---------~--~----~------------~-------~--~----~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to