http://bugs.winehq.org/show_bug.cgi?id=33447
--- Comment #15 from Ken Thomases ken@codeweavers.com 2013-04-24 14:49:21 CDT --- Rather than attempting to change parse_locale_name(), maybe a better approach would be to implement a separate parsing path specific to Mac language tags. It would expect a language subtag ("zh" in this case) and optionally a hyphen ("-") followed by a script code ("Hans"). Then, it could enumerate the locales and compare the language subtag with LOCALE_SISO639LANGNAME and the script code with LOCALE_SSCRIPTS. LOCALE_SSCRIPTS is a list of script codes with semicolon separators and terminator, so we'd want to check if the Mac script code was an element of the list.
A potential problem is that multiple Windows locales might match. I don't know if the Windows locales are in a priority order so that we can rely on the first match being the best match.