Hey fellow Djangorians,

I've got an encoding problem with the latest checkout of Django.  I
just upgraded, on Mac OS X, from 0.96 over to the current SVN trunk.
The migration worked well except for the fact that when I create an
entry with the admin interface that makes use of an Icelandic
character (like eth; \u00F0), editing the entry will yield the
following traceback:

=== START OF TRACEBACK ===

Traceback (most recent call last):

  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/core/servers/basehttp.py", line 277, in
run
    self.result = application(self.environ, self.start_response)

  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/core/servers/basehttp.py", line 631, in
__call__
    return self.application(environ, start_response)

  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/core/handlers/wsgi.py", line 205, in
__call__
    response = self.get_response(request)

  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/core/handlers/base.py", line 120, in
get_response
    return debug.technical_500_response(request, *exc_info)

  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/views/debug.py", line 74, in
technical_500_response
    html = get_traceback_html(request, exc_type, exc_value, tb)

  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/views/debug.py", line 169, in
get_traceback_html
    return t.render(c)

  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/template/__init__.py", line 176, in
render
    return self.nodelist.render(context)

  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/template/__init__.py", line 751, in
render
    bits.append(self.render_node(node, context))

  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/template/debug.py", line 81, in
render_node
    raise wrapped

TemplateSyntaxError: Caught an exception while rendering: unknown
encoding: mac-icelandic

Original Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/template/debug.py", line 71, in
render_node
    result = node.render(context)
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/template/debug.py", line 87, in render
    output = force_unicode(self.filter_expression.resolve(context))
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/template/__init__.py", line 542, in
resolve
    new_obj = func(obj, *arg_vals)
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/template/defaultfilters.py", line 627,
in date
    return format(value, arg)
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/utils/dateformat.py", line 263, in
format
    df = DateFormat(value)
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/utils/dateformat.py", line 114, in
__init__
    self.timezone = LocalTimezone(dt)
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/utils/tzinfo.py", line 36, in __init__
    self._tzname = self.tzname(dt)
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/utils/tzinfo.py", line 55, in tzname
    return smart_unicode(time.tzname[self._isdst(dt)],
DEFAULT_ENCODING)
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/utils/encoding.py", line 37, in
smart_unicode
    return force_unicode(s, encoding, strings_only, errors)
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/utils/encoding.py", line 58, in
force_unicode
    s = s.decode(encoding, errors)
LookupError: unknown encoding: mac-icelandic

=== END OF TRACEBACK ===

I've tried changing my locale by adding the following exports to
my .bash_profile and then running a 'source':

    export LC_ALL=is_IS.UTF-8
    export LANG=is_IS.UTF-8

I've also tried rebuilding the database with this new configuration,
without success.  I'm somewhat confused as to the source of this
error, since none of my own files should have an encoding of 'mac-
icelandic', and my understanding is that sqlite should be wise enough
to use only UTF-8.

I'd appreciate any help you could give me in troubleshooting this
problem, at this point the slightest hint is immensely helpful.

Thanks in advance,
Friðrik Már
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to