Re: PATCH:kernel32/locale:Fix some bugs about special Chinese test in parse_locale_name()
On 14.04.2017 13:21, THuang wrote:
@@ -457,6 +457,8 @@ static void parse_locale_name( const WCHAR *str, struct locale_name *name ) static const WCHAR cW[] = {'C',0}; static const WCHAR latinW[] = {'l','a','t','i','n',0}; static const WCHAR latnW[] = {'-','L','a','t','n',0}; + static const WCHAR HantW[] = {'-','H','a','n','t',0}; + static const WCHAR HansW[] = {'-','H','a','n','s',0}; WCHAR *p;
TRACE("%s\n", debugstr_w(str)); @@ -487,6 +489,16 @@ static void parse_locale_name( const WCHAR *str, struct locale_name *name ) else if (*p == '-') /* Windows format */ { strcpyW( name->win_name, name->lang ); + if(!strcmpiW(p,HantW)){ + name->lcid = 0x0c04; + name->matches = 1; + return ; + } + if(!strcmpiW(p,HansW)){ + name->lcid = 0x0804; + name->matches = 1; + return ; + } *p++ = 0; name->country = p; if (!(p = strpbrkW( p, winsepW ))) goto done;
Well, no, that's not how it works. Did you explore a possibility if adding hant/hans specific locale data to kernel32/nls will help?
participants (1)
-
Nikolay Sivov