Restore support for UTF-8 locales
Dmitry Timoshkov
dmitry at baikal.ru
Tue Dec 2 10:30:19 CST 2003
Hello,
UTF-8 support is broken in the current CVS version.
Since currently init_codepages() is called before LOCALE_Init()
has a chance to properly initialize locale support (the call
to EnumResourceLanguages callback from get_language_id does a call
to GetLocaleInfoA), unix_cptable gets initialized to 28591 and
therefore is not NULL, which indicates that it's not UTF-8.
So, the solution is to force unix_cptable to become NULL for
UTF-8 locale.
Changelog:
Dmitry Timoshkov <dmitry at codeweavers.com>
Restore support for UTF-8 locales.
--- cvs/hq/wine/dlls/kernel/locale.c 2003-11-22 21:56:10
+++ wine/dlls/kernel/locale.c 2003-12-02 23:44:17
@@ -2384,6 +2384,8 @@ void LOCALE_Init(void)
if (!(unix_cptable = wine_cp_get_table( unix_cp )))
unix_cptable = wine_cp_get_table( 28591 );
}
+ else
+ unix_cptable = NULL; /* NULL indicates UTF8 */
__wine_init_codepages( ansi_cptable, oem_cptable );
More information about the wine-patches
mailing list