diff options
author | Tor Lillqvist <tml@novell.com> | 2007-03-07 22:11:29 +0000 |
---|---|---|
committer | Tor Lillqvist <tml@src.gnome.org> | 2007-03-07 22:11:29 +0000 |
commit | 8cbd429fa4888417b7302d61d07a28d16e0c1de8 (patch) | |
tree | 55e588103f312fa51c75b562ce2b43eb375cd0d9 /modules | |
parent | 1ae71fc57a6c045031be2e067ed00b14eddfbc32 (diff) | |
download | pango-8cbd429fa4888417b7302d61d07a28d16e0c1de8.tar.gz |
An ISO639 code is always in ASCII, no need to call the wide-character
2007-03-07 Tor Lillqvist <tml@novell.com>
* modules/basic/basic-win32.c: An ISO639 code is always
in ASCII, no need to call the wide-character version of
GetLocaleInfo().
svn path=/trunk/; revision=2210
Diffstat (limited to 'modules')
-rw-r--r-- | modules/basic/basic-win32.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/modules/basic/basic-win32.c b/modules/basic/basic-win32.c index d61b32e5..6efde389 100644 --- a/modules/basic/basic-win32.c +++ b/modules/basic/basic-win32.c @@ -205,19 +205,10 @@ static char * lang_name (int lang) { LCID lcid = MAKELCID (lang, SORT_DEFAULT); - wchar_t iso639[10]; static char retval[10]; - gchar *utf8_lang; - if (!GetLocaleInfoW (lcid, LOCALE_SISO639LANGNAME, iso639, G_N_ELEMENTS (iso639)) || - (utf8_lang = g_utf16_to_utf8 (iso639, -1, NULL, NULL, NULL)) == NULL || - strlen (utf8_lang) >= sizeof (retval)) + if (!GetLocaleInfo (lcid, LOCALE_SISO639LANGNAME, retval, G_N_ELEMENTS (retval))) sprintf (retval, "%#02x", lang); - else - { - strcpy (retval, utf8_lang); - g_free (utf8_lang); - } return retval; } |