Dmitry Timoshkov : kernel32: Separate modifier from charset before detecting the charset codepage.

Alexandre Julliard julliard at winehq.org
Fri Feb 8 06:20:15 CST 2008


Module: wine
Branch: master
Commit: 667dad2331fc35441da9490ab795e90d07b376a7
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=667dad2331fc35441da9490ab795e90d07b376a7

Author: Dmitry Timoshkov <dmitry at codeweavers.com>
Date:   Fri Feb  8 20:03:39 2008 +0800

kernel32: Separate modifier from charset before detecting the charset codepage.

---

 dlls/kernel32/locale.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/dlls/kernel32/locale.c b/dlls/kernel32/locale.c
index a8bd099..a13c346 100644
--- a/dlls/kernel32/locale.c
+++ b/dlls/kernel32/locale.c
@@ -351,6 +351,8 @@ static void parse_locale_name( const WCHAR *str, struct locale_name *name )
     static const WCHAR latnW[] = {'-','L','a','t','n',0};
     WCHAR *p;
 
+    TRACE("%s\n", debugstr_w(str));
+
     name->country = name->charset = name->script = name->modifier = NULL;
     name->lcid = MAKELCID( MAKELANGID(LANG_ENGLISH,SUBLANG_DEFAULT), SORT_DEFAULT );
     name->matches = 0;
@@ -395,7 +397,6 @@ static void parse_locale_name( const WCHAR *str, struct locale_name *name )
         {
             *p++ = 0;
             name->charset = p;
-            name->codepage = find_charset( name->charset );
             p = strchrW( p, '@' );
         }
         if (p)
@@ -404,6 +405,9 @@ static void parse_locale_name( const WCHAR *str, struct locale_name *name )
             name->modifier = p;
         }
 
+        if (name->charset)
+            name->codepage = find_charset( name->charset );
+
         /* rebuild a Windows name if possible */
 
         if (name->charset) goto done;  /* can't specify charset in Windows format */




More information about the wine-cvs mailing list