mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-10-03 12:19:20 +02:00
Implement on Win32.
2000-05-30 Tor Lillqvist <tml@iki.fi> * gutils.c (g_locale_get_codeset): Implement on Win32. * glib.def: Add g_get_codeset. * tests/Makefile.am (EXTRA_DIST): makefile.cygwin* has been renamed to makefile.mingw*.
This commit is contained in:
committed by
Tor Lillqvist
parent
e0b5636031
commit
88fd181eac
@@ -617,7 +617,7 @@ g_get_any_init (void)
|
||||
guint len = 17;
|
||||
gchar buffer[17];
|
||||
|
||||
if (GetUserName (buffer, &len))
|
||||
if (GetUserName ((LPTSTR) buffer, (LPDWORD) &len))
|
||||
{
|
||||
g_user_name = g_strdup (buffer);
|
||||
g_real_name = g_strdup (buffer);
|
||||
@@ -776,8 +776,15 @@ g_get_codeset (void)
|
||||
char *result = nl_langinfo (CODESET);
|
||||
return g_strdup (result);
|
||||
#else
|
||||
#ifndef G_OS_WIN32
|
||||
/* FIXME: Do something more intelligent based on setlocale (LC_CTYPE, NULL)
|
||||
*/
|
||||
return g_strdup ("ISO-8859-1");
|
||||
#else
|
||||
/* On Win32 we always use UTF-8. At least in GDK. SO should we
|
||||
* therefore return that?
|
||||
*/
|
||||
return g_strdup ("UTF-8");
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user