Hi,
I've the same django app deployed to my local mac os x and linux
server. I print the username in my view function to the standart
output:
    def my_view(request):
        print request.user

On mac it prints:
    İşÖ

which is what i expect. But on linux it prints:
    \xc4\xb0\xc5\x9f\xc3\x96


If I change my view code as:
    def my_view(request):
        print u"%s" % request.user

On mac it prints the same as before:
    İşÖ

But on linux it raises a UnicodeEncodeError:
    UnicodeEncodeError: 'ascii' codec can't encode characters in
position 0-2: ordinal not in range(128)

So, these are two cases of different behaviour. Databases in both of
the machines are mysql, and the auth_user tables in both machines have
a charset of utf8.

Could somebody tell what would be the reason?

Thanks






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