Pascal Garcia added the comment:

Sorry for this error.
Thanks for the solution.

Here is the code as I modify it.
            wrkdir= os.path.expanduser("~"+os.sep)
            loc = locale.getdefaultlocale()
            if loc[1]:
                encoding = loc[1]
                wrkdir= wrkdir.decode(encoding)

I need to explicitally decode the string if I want to use it and have the next 
sentence working a bit further.
            os.path.join(wrkdir, u"Tango\\")

Encodding is a very good motivation to go to python3, and if i didn't have 
other constraints it would be done for ages.

For this special case I think that function should return strings with the 
default encoding, and the programmer should not have to know about the 
underground to make the right decode.

But it works, thanks again.
Pascal

----------
resolution: invalid -> 
status: closed -> open
type: behavior -> 

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18171>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to