kernel32: On Mac OS, recompose the Unicode strings we get from the OS.

This commit is contained in:
Alexandre Julliard 2008-02-15 12:07:56 +01:00
parent 86ff825f41
commit 58913b439b
2 changed files with 7 additions and 1 deletions

View File

@ -1830,6 +1830,9 @@ INT WINAPI MultiByteToWideChar( UINT page, DWORD flags, LPCSTR src, INT srclen,
ret = wine_cp_mbstowcs( unix_cptable, flags, src, srclen, dst, dstlen );
break;
}
#ifdef __APPLE__
flags |= MB_COMPOSITE; /* work around broken Mac OS X filesystem that enforces decomposed Unicode */
#endif
/* fall through */
case CP_UTF8:
ret = wine_utf8_mbstowcs( flags, src, srclen, dst, dstlen );

View File

@ -65,6 +65,9 @@ void __wine_init_codepages( const union cptable *ansi, const union cptable *oem,
int ntdll_umbstowcs(DWORD flags, const char* src, int srclen, WCHAR* dst, int dstlen)
{
#ifdef __APPLE__
flags |= MB_COMPOSITE; /* work around broken Mac OS X filesystem that enforces decomposed Unicode */
#endif
return (unix_table) ?
wine_cp_mbstowcs( unix_table, flags, src, srclen, dst, dstlen ) :
wine_utf8_mbstowcs( flags, src, srclen, dst, dstlen );