[issue9542] Create PyUnicode_FSDecoder() function

2010-08-13 Thread STINNER Victor
STINNER Victor added the comment: Commited to 3.2 as r83990. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ __

[issue9542] Create PyUnicode_FSDecoder() function

2010-08-12 Thread STINNER Victor
STINNER Victor added the comment: Lib/os.py may also be patched to add a Python implementation. Eg. def fsdecode(value): if isinstance(value, str): return value elif isinstance(value, bytes): encoding = sys.getfilesystemencoding() if encoding == 'mbcs':

[issue9542] Create PyUnicode_FSDecoder() function

2010-08-08 Thread STINNER Victor
New submission from STINNER Victor : For my work on #9425 (Rewrite import machinery to work with unicode paths), I need a PyArg_Parse converter converting bytes and str to str. PyUnicode_FSConverter() is the opposite because it encodes str to bytes. To handle (input) filenames in a function, w