What is result of:

  sys.getdefaultencoding()

from command line and within WSGI application under mod_wsgi.

Graham

2009/11/15 Hannes <[email protected]>:
>
> Hello,
>
> I'm using mod_wsgi 2.5 and Python 2.6.4 on Linux.
>
> The behavior I'd expect of os.listdir is that it should return either
> a) a list of str, if the given path argument is of type str or
> b) a list of unicode objects, if the given path argument is a unicode
> object.
>
> If (and so far only if) I call os.listdir from within a wsgi-
> application (and pass a unicode object for the path), it returns a
> list of both unicode objects and strings, namely strings in case the
> corresponding file name contains non-ascii characters.
>
> Has anybody experienced this? I'm currently working around this by
> passing a string to os.listdir (in which case it returns only strings)
> and converting the result to unicode manually. If this is a mod_wsgi
> issue, I'll file an issue.
>
> cheers
>  Hannes
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"modwsgi" 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/modwsgi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to