Commit 58913b43 authored by Alexandre Julliard's avatar Alexandre Julliard

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

parent 86ff825f
...@@ -1830,6 +1830,9 @@ INT WINAPI MultiByteToWideChar( UINT page, DWORD flags, LPCSTR src, INT srclen, ...@@ -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 ); ret = wine_cp_mbstowcs( unix_cptable, flags, src, srclen, dst, dstlen );
break; break;
} }
#ifdef __APPLE__
flags |= MB_COMPOSITE; /* work around broken Mac OS X filesystem that enforces decomposed Unicode */
#endif
/* fall through */ /* fall through */
case CP_UTF8: case CP_UTF8:
ret = wine_utf8_mbstowcs( flags, src, srclen, dst, dstlen ); ret = wine_utf8_mbstowcs( flags, src, srclen, dst, dstlen );
......
...@@ -64,7 +64,10 @@ void __wine_init_codepages( const union cptable *ansi, const union cptable *oem, ...@@ -64,7 +64,10 @@ 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) 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) ? return (unix_table) ?
wine_cp_mbstowcs( unix_table, flags, src, srclen, dst, dstlen ) : wine_cp_mbstowcs( unix_table, flags, src, srclen, dst, dstlen ) :
wine_utf8_mbstowcs( flags, src, srclen, dst, dstlen ); wine_utf8_mbstowcs( flags, src, srclen, dst, dstlen );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment