From 23e1c587a2cabd809f1b91f968d27627f60e5c41 Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Tue, 26 Apr 2005 21:21:32 +0000 Subject: [PATCH] Minor changes into a way locales are get and listed svn path=/trunk/; revision=14824 --- reactos/lib/cpl/intl/locale.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/reactos/lib/cpl/intl/locale.c b/reactos/lib/cpl/intl/locale.c index e183e445266..87479c05a74 100644 --- a/reactos/lib/cpl/intl/locale.c +++ b/reactos/lib/cpl/intl/locale.c @@ -47,7 +47,8 @@ BOOL CALLBACK LocalesEnumProc( TCHAR lang[255]; int index; - swscanf(lpLocale, L"%lx", &lcid); // maybe use wcstoul? + //swscanf(lpLocale, L"%lx", &lcid); // maybe use wcstoul? + lcid = wcstoul(lpLocale, NULL, 16); GetLocaleInfo(lcid, LOCALE_SLANGUAGE, lang, sizeof(lang)); @@ -74,7 +75,7 @@ CreateLanguagesList(HWND hwnd) EnumSystemLocalesW(LocalesEnumProc, LCID_SUPPORTED); // Select current locale - GetLocaleInfo(GetUserDefaultLCID(), LOCALE_SLANGUAGE, langSel, sizeof(langSel)); // or should it be System? + GetLocaleInfo(GetUserDefaultLCID(), LOCALE_SLANGUAGE, langSel, sizeof(langSel)); // or should it be System and not user? SendMessageW(hList, CB_SELECTSTRING,