Module: wine Branch: master Commit: 58913b439b797462a70794774b87e63283109617 URL: http://source.winehq.org/git/wine.git/?a=commit;h=58913b439b797462a70794774b...
Author: Alexandre Julliard julliard@winehq.org Date: Fri Feb 15 12:07:56 2008 +0100
kernel32: On Mac OS, recompose the Unicode strings we get from the OS.
---
dlls/kernel32/locale.c | 3 +++ dlls/ntdll/rtlstr.c | 5 ++++- 2 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/dlls/kernel32/locale.c b/dlls/kernel32/locale.c index a13c346..1130349 100644 --- a/dlls/kernel32/locale.c +++ b/dlls/kernel32/locale.c @@ -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 ); diff --git a/dlls/ntdll/rtlstr.c b/dlls/ntdll/rtlstr.c index ecd8523..deec931 100644 --- a/dlls/ntdll/rtlstr.c +++ b/dlls/ntdll/rtlstr.c @@ -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) -{ +{ +#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 );