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:
Tor Lillqvist
2000-05-30 20:46:03 +00:00
committed by Tor Lillqvist
parent e0b5636031
commit 88fd181eac
13 changed files with 93 additions and 5 deletions

View File

@@ -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
}