http://bugs.winehq.org/show_bug.cgi?id=26632
--- Comment #4 from Sagawa sagawa.aki+winebugs@gmail.com 2011-04-02 07:55:23 CDT --- (In reply to comment #3)
Is it another difference in Microsoft interpretation of Unicode?
Probably yes. Their implementation converts some undefined byte character to Unicode Private Use Areas (PUA). It is necessary to do round-trip conversion (e.g. ANSI:0xFF turns into Unicode:U+F8F3, then it should be ANSI:0xFF).
Although that, PUA is not a right place to map because Unicode standards does not define characters in that area. Thus MB_ERR_INVALID_CHARS flag doesn't allow to convert to PUA.