On Tue, Nov 22, 2011 at 12:33 PM, Marc <mrec...@gmail.com> wrote:
> Thanks Tom for your post.
>
> I had read an interesting thread on that subject on
> groups.google.com/group/modwsgi/browse_thread/thread/
> ac729cc408ca516b/
> but could get any success trying to put some locale related
> environment
> variables in /usr/sbin/envvars. In fact the only required variable to
> return the proper encoding is to set export LC_LANG="fr_FR.UTF-8"
> (LC_CTYPE="fr_FR.UTF-8" does not work).
>
> Python Doc regarding sys.getfilesystemencoding() says the value is
> from
> nl_langinfo(CODESET). man nl_langinfo says that this value is related
> to
> LC_CTYPE
>
> It seems to me that there should be some improvement in both mod_wsgi
> doc and Python doc (not to mention Django doc) regarding that aspect.
>
> This problem is now solved for me, but I spent a considerable amount
> of
> time to solve it. I will post the problem to mod_wsgi and Python
> lists.
>
> Thanks again
>

Yep, I agree 100%. It's nonsensical that a file system these days
doesn't have an associated encoding, or that how files are presented
to a user depends upon one environment variable (or the absence of
one).  It seems crazy to me that you can write a perfectly correct
python app that generates unicode and have it fail because LANG is
undefined and python assumes that you want ASCII - what year is this,
1985?.

Character encodings drive me batty!

Cheers

Tom

-- 
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