Even if g_get_codeset() is currently commented out from gutils.h, fix it
authorTor Lillqvist <tml@iki.fi>
Sat, 20 Jan 2001 22:26:32 +0000 (22:26 +0000)
committerTor Lillqvist <tml@src.gnome.org>
Sat, 20 Jan 2001 22:26:32 +0000 (22:26 +0000)
2001-01-20  Tor Lillqvist  <tml@iki.fi>

* gutils.c (g_get_codeset): (Win32) Even if g_get_codeset() is
currently commented out from gutils.h, fix it to return the same
CP%d value as g_get_charset().

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
glib/gutils.c
gutils.c

index 6e822ef..aa0d3eb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2001-01-20  Tor Lillqvist  <tml@iki.fi>
+
+       * gutils.c (g_get_codeset): (Win32) Even if g_get_codeset() is
+       currently commented out from gutils.h, fix it to return the same
+       CP%d value as g_get_charset().
+
 2001-01-19  Kjartan Maraas  <kmaraas@gnome.org>
 
        * gconvert.c: Fix typo.
index 6e822ef..aa0d3eb 100644 (file)
@@ -1,3 +1,9 @@
+2001-01-20  Tor Lillqvist  <tml@iki.fi>
+
+       * gutils.c (g_get_codeset): (Win32) Even if g_get_codeset() is
+       currently commented out from gutils.h, fix it to return the same
+       CP%d value as g_get_charset().
+
 2001-01-19  Kjartan Maraas  <kmaraas@gnome.org>
 
        * gconvert.c: Fix typo.
index 6e822ef..aa0d3eb 100644 (file)
@@ -1,3 +1,9 @@
+2001-01-20  Tor Lillqvist  <tml@iki.fi>
+
+       * gutils.c (g_get_codeset): (Win32) Even if g_get_codeset() is
+       currently commented out from gutils.h, fix it to return the same
+       CP%d value as g_get_charset().
+
 2001-01-19  Kjartan Maraas  <kmaraas@gnome.org>
 
        * gconvert.c: Fix typo.
index 6e822ef..aa0d3eb 100644 (file)
@@ -1,3 +1,9 @@
+2001-01-20  Tor Lillqvist  <tml@iki.fi>
+
+       * gutils.c (g_get_codeset): (Win32) Even if g_get_codeset() is
+       currently commented out from gutils.h, fix it to return the same
+       CP%d value as g_get_charset().
+
 2001-01-19  Kjartan Maraas  <kmaraas@gnome.org>
 
        * gconvert.c: Fix typo.
index 6e822ef..aa0d3eb 100644 (file)
@@ -1,3 +1,9 @@
+2001-01-20  Tor Lillqvist  <tml@iki.fi>
+
+       * gutils.c (g_get_codeset): (Win32) Even if g_get_codeset() is
+       currently commented out from gutils.h, fix it to return the same
+       CP%d value as g_get_charset().
+
 2001-01-19  Kjartan Maraas  <kmaraas@gnome.org>
 
        * gconvert.c: Fix typo.
index 6e822ef..aa0d3eb 100644 (file)
@@ -1,3 +1,9 @@
+2001-01-20  Tor Lillqvist  <tml@iki.fi>
+
+       * gutils.c (g_get_codeset): (Win32) Even if g_get_codeset() is
+       currently commented out from gutils.h, fix it to return the same
+       CP%d value as g_get_charset().
+
 2001-01-19  Kjartan Maraas  <kmaraas@gnome.org>
 
        * gconvert.c: Fix typo.
index 6e822ef..aa0d3eb 100644 (file)
@@ -1,3 +1,9 @@
+2001-01-20  Tor Lillqvist  <tml@iki.fi>
+
+       * gutils.c (g_get_codeset): (Win32) Even if g_get_codeset() is
+       currently commented out from gutils.h, fix it to return the same
+       CP%d value as g_get_charset().
+
 2001-01-19  Kjartan Maraas  <kmaraas@gnome.org>
 
        * gconvert.c: Fix typo.
index 6e822ef..aa0d3eb 100644 (file)
@@ -1,3 +1,9 @@
+2001-01-20  Tor Lillqvist  <tml@iki.fi>
+
+       * gutils.c (g_get_codeset): (Win32) Even if g_get_codeset() is
+       currently commented out from gutils.h, fix it to return the same
+       CP%d value as g_get_charset().
+
 2001-01-19  Kjartan Maraas  <kmaraas@gnome.org>
 
        * gconvert.c: Fix typo.
index c48fb2d..61cdcf5 100644 (file)
@@ -69,7 +69,6 @@
 #  include <windows.h>
 #  include <ctype.h>
 #  include <direct.h>
-#  include <io.h>
 #endif /* G_OS_WIN32 */
 
 #ifdef HAVE_CODESET
@@ -994,10 +993,7 @@ g_get_codeset (void)
    */
   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");
+  return g_strdup_printf ("CP%d", GetACP ());
 #endif
 #endif
 }
index c48fb2d..61cdcf5 100644 (file)
--- a/gutils.c
+++ b/gutils.c
@@ -69,7 +69,6 @@
 #  include <windows.h>
 #  include <ctype.h>
 #  include <direct.h>
-#  include <io.h>
 #endif /* G_OS_WIN32 */
 
 #ifdef HAVE_CODESET
@@ -994,10 +993,7 @@ g_get_codeset (void)
    */
   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");
+  return g_strdup_printf ("CP%d", GetACP ());
 #endif
 #endif
 }