mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-03 14:42:10 +01:00
Use g_win32_getlocale() instead of setlocale() on Windows. setlocale()
2005-01-04 Tor Lillqvist <tml@iki.fi> * glib/guniprop.c (get_locale_type): Use g_win32_getlocale() instead of setlocale() on Windows. setlocale() returns strings like "Turkish_Turkey".
This commit is contained in:
parent
38c39a7cfd
commit
b7de9fc3b6
@ -1,3 +1,9 @@
|
|||||||
|
2005-01-04 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* glib/guniprop.c (get_locale_type): Use g_win32_getlocale()
|
||||||
|
instead of setlocale() on Windows. setlocale() returns strings
|
||||||
|
like "Turkish_Turkey".
|
||||||
|
|
||||||
2005-01-04 Matthias Clasen <mclasen@redhat.com>
|
2005-01-04 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
Fix the inlining magic. (#157536, Jens Hatlak, and
|
Fix the inlining magic. (#157536, Jens Hatlak, and
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
2005-01-04 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* glib/guniprop.c (get_locale_type): Use g_win32_getlocale()
|
||||||
|
instead of setlocale() on Windows. setlocale() returns strings
|
||||||
|
like "Turkish_Turkey".
|
||||||
|
|
||||||
2005-01-04 Matthias Clasen <mclasen@redhat.com>
|
2005-01-04 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
Fix the inlining magic. (#157536, Jens Hatlak, and
|
Fix the inlining magic. (#157536, Jens Hatlak, and
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
2005-01-04 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* glib/guniprop.c (get_locale_type): Use g_win32_getlocale()
|
||||||
|
instead of setlocale() on Windows. setlocale() returns strings
|
||||||
|
like "Turkish_Turkey".
|
||||||
|
|
||||||
2005-01-04 Matthias Clasen <mclasen@redhat.com>
|
2005-01-04 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
Fix the inlining magic. (#157536, Jens Hatlak, and
|
Fix the inlining magic. (#157536, Jens Hatlak, and
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
2005-01-04 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* glib/guniprop.c (get_locale_type): Use g_win32_getlocale()
|
||||||
|
instead of setlocale() on Windows. setlocale() returns strings
|
||||||
|
like "Turkish_Turkey".
|
||||||
|
|
||||||
2005-01-04 Matthias Clasen <mclasen@redhat.com>
|
2005-01-04 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
Fix the inlining magic. (#157536, Jens Hatlak, and
|
Fix the inlining magic. (#157536, Jens Hatlak, and
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
2005-01-04 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* glib/guniprop.c (get_locale_type): Use g_win32_getlocale()
|
||||||
|
instead of setlocale() on Windows. setlocale() returns strings
|
||||||
|
like "Turkish_Turkey".
|
||||||
|
|
||||||
2005-01-04 Matthias Clasen <mclasen@redhat.com>
|
2005-01-04 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
Fix the inlining magic. (#157536, Jens Hatlak, and
|
Fix the inlining magic. (#157536, Jens Hatlak, and
|
||||||
|
@ -525,7 +525,16 @@ typedef enum {
|
|||||||
static LocaleType
|
static LocaleType
|
||||||
get_locale_type (void)
|
get_locale_type (void)
|
||||||
{
|
{
|
||||||
|
#ifdef G_OS_WIN32
|
||||||
|
char *tem = g_win32_getlocale ();
|
||||||
|
char locale[2];
|
||||||
|
|
||||||
|
locale[0] = tem[0];
|
||||||
|
locale[1] = tem[1];
|
||||||
|
g_free (tem);
|
||||||
|
#else
|
||||||
const char *locale = setlocale (LC_CTYPE, NULL);
|
const char *locale = setlocale (LC_CTYPE, NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
switch (locale[0])
|
switch (locale[0])
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user