Author: mturk
Date: Tue Aug 18 09:53:52 2009
New Revision: 805334

URL: http://svn.apache.org/viewvc?rev=805334&view=rev
Log:
Vista fails on MB_PRECOMPOSED

Modified:
    commons/sandbox/runtime/trunk/src/main/native/os/win32/wutil.c

Modified: commons/sandbox/runtime/trunk/src/main/native/os/win32/wutil.c
URL: 
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/win32/wutil.c?rev=805334&r1=805333&r2=805334&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/win32/wutil.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/win32/wutil.c Tue Aug 18 
09:53:52 2009
@@ -127,7 +127,7 @@
             t += 6;
         }
     }
-    if (!MultiByteToWideChar(CP_UTF8,  MB_PRECOMPOSED | MB_ERR_INVALID_CHARS,
+    if (!MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS,
                              srcstr, srclen, t, retlen))
         return ACR_GET_OS_ERROR();
     for (; *t; t++) {
@@ -177,8 +177,7 @@
     wchar_t *res;
     if (!str)
         return NULL;
-    if (!(len = MultiByteToWideChar(CP_UTF8,
-                                    MB_PRECOMPOSED | MB_ERR_INVALID_CHARS,
+    if (!(len = MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS,
                                     str, -1, NULL, 0))) {
         if (GetLastError() != ERROR_INSUFFICIENT_BUFFER)
             errno = EILSEQ;
@@ -187,7 +186,7 @@
     res = malloc(len * sizeof(wchar_t));
     if (!res)
         return NULL;
-    if (!MultiByteToWideChar(CP_UTF8, MB_PRECOMPOSED | MB_ERR_INVALID_CHARS,
+    if (!MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS,
                              str, -1, res, len)) {
         DWORD saved = GetLastError();
         free(res);


Reply via email to