Hello, I have an application that uses os.listdir(u'some path') that should return a list of unicode strings.
This works fine as long as I use the manage.py runserver server. As soon as I deploy on Apache with mod_wsgi, I get the Caught UnicodeDecodeError while rendering: 'ascii' codec can't decode byte 0xc3 in position 15: ordinal not in range(128) for the same piece of code. I discovered that the problem is that the os.listdir() does not return unicode but byte strings although the requested path is unicode. What could be wrong please ? Python 2.7.2 Linux 3.1.0-4-pae Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/1.0.0e DAV/2 PHP/5.3.8 with Suhosin-Patch mod_wsgi/3.3 Python/2.7.2 -- 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.