http://bugs.winehq.org/show_bug.cgi?id=26632
--- Comment #10 from Sagawa sagawa.aki+winebugs@gmail.com 2011-04-03 01:10:11 CDT --- (In reply to comment #8)
ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP932.TXT specifically marks 0xA0, 0xFD, 0xFE and 0xFF as #UNDEFINED, our parser needs to mark those as invalid somehow.
Yes that's right.
Please note 0x80 is also marked as #UNDEFINED in CP932.TXT. But MultiByteToWideChar with MB_ERR_INVALID_CHARS doesn't complain it.
The big difference between them is that 0xA0, 0xFD, 0xFE and 0xFF are mapped into Private Unicode Area in bestfit932.txt[1], 0x80 is not.
[1] ... ftp://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit932.txt
I wrote a proposed patch using this observation.