diff options
author | Tor Lillqvist <tml@iki.fi> | 2000-05-30 20:46:03 +0000 |
---|---|---|
committer | Tor Lillqvist <tml@src.gnome.org> | 2000-05-30 20:46:03 +0000 |
commit | 88fd181eac4fad985bfa54ca5f30bb6d149eaee5 (patch) | |
tree | 16dd78d2f3db155f476f3023ef60a6e9840dd36a /glib | |
parent | e0b563603105e65890d0adc581d6c84cbf611ba9 (diff) | |
download | glib-88fd181eac4fad985bfa54ca5f30bb6d149eaee5.tar.gz |
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*.
Diffstat (limited to 'glib')
-rw-r--r-- | glib/glib.def | 1 | ||||
-rw-r--r-- | glib/gutils.c | 9 |
2 files changed, 9 insertions, 1 deletions
diff --git a/glib/glib.def b/glib/glib.def index c7ea6ffe9..18e7e08e2 100644 --- a/glib/glib.def +++ b/glib/glib.def @@ -93,6 +93,7 @@ EXPORTS g_filename_from_utf8 g_filename_to_utf8 g_free + g_get_codeset g_get_current_dir g_get_current_time g_get_home_dir diff --git a/glib/gutils.c b/glib/gutils.c index 3b6659841..c9f2c2805 100644 --- a/glib/gutils.c +++ b/glib/gutils.c @@ -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 } |