[issue13247] os.path.abspath returns unicode paths as question marks

Yuval Greenfield report at bugs.python.org
Wed Oct 26 08:36:33 CEST 2011


Yuval Greenfield <ubershmekel at gmail.com> added the comment:

I use python a lot with Hebrew and many websites have internationalization which may involve unicode paths. I agree that saying "unicode paths are rare" is inaccurate. 

If the current situation isn't fixed though - you just can't use the resulting path for almost anything. Do you have a use case Ishimoto?

Windows XP and up implement paths as unicode, that means that a bytes api doesn't even make sense unless python does some encoding and decoding for you. E.g. python can use the unicode API's internally and return utf-8 encoded bytes. But you couldn't use these paths outside of python. The fact is you shouldn't be doing os.path.abspath(b'.') in windows to begin with.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13247>
_______________________________________


More information about the Python-bugs-list mailing list