Bug 11232 – Windows sysErrorString only supports ASCII

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
Windows
Creation time
2013-10-12T01:57:00Z
Last change time
2013-10-15T16:55:26Z
Keywords
pull
Assigned to
nobody
Creator
jakobovrum

Comments

Comment #0 by jakobovrum — 2013-10-12T01:57:45Z
`std.windows.syserror.sysErrorString` uses `FormatMessageA` when it should be using `FormatMessageW`. This results in the infamous question marks when the text is in a non-English language; for some combinations of language and error message, the entire text is composed of nothing but question marks.
Comment #1 by github-bugzilla — 2013-10-15T16:52:52Z
Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/b97b4e96202ba7fec103ece3993f3b8e86faf7d3 fix issue 11232 - rewritten std.windows.syserror.sysErrorString Fixed for Unicode-correctness; now works on non-English Windows systems. Added unit test. Throws an Exception if the given error code or language combination was invalid. https://github.com/D-Programming-Language/phobos/commit/a2fea332ed7f86130942487614152aa3ed91f1c4 Merge pull request #1634 from JakobOvrum/syserrorstring fix issue 11232 - rewritten std.windows.syserror.sysErrorString