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

Atsuo Ishimoto report at bugs.python.org
Wed Oct 26 04:18:44 CEST 2011


Atsuo Ishimoto <ishimoto at gembook.org> added the comment:

On Wed, Oct 26, 2011 at 9:12 AM, STINNER Victor <report at bugs.python.org> wrote:
>
> STINNER Victor <victor.stinner at haypocalc.com> added the comment:
>
> Le 26/10/2011 01:32, Atsuo Ishimoto a écrit :
>> - I don't think filenames cannot be decoded in ANSI code page are rare enough to be ignored.
>
> The issue is able being able to be noticied of encoding errors.

This patch solve nothing, but just raises exception. It can break
existing codes. Also, I don't think it worth to add weired behavior to
Python std lib. I'll be surprised if *Byte* API raised an
UnicodeEncodeError.

> Anyway, you must use the Unicode API on Windows. If you use the Unicode
> API, filenames are no more encoded and code pages are no more used, so
> bye bye Unicode errors!
>

Agreed. So I would like to suggest not to adding unnecessary
complexity to the Byte API.

----------

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


More information about the Python-bugs-list mailing list