[New-bugs-announce] [issue1075] py3k: Unicode error in os.stat on Windows

Amaury Forgeot d'Arc report at bugs.python.org
Fri Aug 31 23:18:22 CEST 2007


New submission from Amaury Forgeot d'Arc:

os.stat("nonexistent") raises a UnicodeDecodeError on German, Polish and
French Windowses.
The reason: Windows returns an error message which contains accented
letters encoded as MBCS, but python decodes it with utf-8.
This patch uses the Unicode version of FormatMessageW to get the unicode
string directly.

----------
files: errors.diff
messages: 55539
nosy: amaury.forgeotdarc
severity: normal
status: open
title: py3k: Unicode error in os.stat on Windows

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1075>
__________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: errors.diff
Type: application/octet-stream
Size: 4575 bytes
Desc: not available
Url : http://mail.python.org/pipermail/new-bugs-announce/attachments/20070831/58118052/attachment.obj 


More information about the New-bugs-announce mailing list