summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2004-10-30 03:20:31 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2004-10-30 03:20:31 +0000
commitb190dce984e1b2af1e9fd90bc223367fb7e493e4 (patch)
tree029836661cd5b388962122e7dbadf76f887df4ff
parentaa410edee6042a526559f0c534072013252cce52 (diff)
downloadglib-b190dce984e1b2af1e9fd90bc223367fb7e493e4.tar.gz
Convert filenames to UTF-8 on Windows.
2004-10-29 Matthias Clasen <mclasen@redhat.com> * glib/goption.c (parse_arg): Convert filenames to UTF-8 on Windows.
-rw-r--r--ChangeLog5
-rw-r--r--ChangeLog.pre-2-105
-rw-r--r--ChangeLog.pre-2-125
-rw-r--r--ChangeLog.pre-2-65
-rw-r--r--ChangeLog.pre-2-85
-rw-r--r--glib/goption.c16
6 files changed, 39 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 8c3b56610..1542390c8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-10-29 Matthias Clasen <mclasen@redhat.com>
+
+ * glib/goption.c (parse_arg): Convert filenames to UTF-8 on
+ Windows.
+
2004-10-29 Hans Breuer <hans@breuer.org>
* glibconfig.h */makefile.msc.in : updated [and finally fixed my
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 8c3b56610..1542390c8 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,8 @@
+2004-10-29 Matthias Clasen <mclasen@redhat.com>
+
+ * glib/goption.c (parse_arg): Convert filenames to UTF-8 on
+ Windows.
+
2004-10-29 Hans Breuer <hans@breuer.org>
* glibconfig.h */makefile.msc.in : updated [and finally fixed my
diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12
index 8c3b56610..1542390c8 100644
--- a/ChangeLog.pre-2-12
+++ b/ChangeLog.pre-2-12
@@ -1,3 +1,8 @@
+2004-10-29 Matthias Clasen <mclasen@redhat.com>
+
+ * glib/goption.c (parse_arg): Convert filenames to UTF-8 on
+ Windows.
+
2004-10-29 Hans Breuer <hans@breuer.org>
* glibconfig.h */makefile.msc.in : updated [and finally fixed my
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index 8c3b56610..1542390c8 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,8 @@
+2004-10-29 Matthias Clasen <mclasen@redhat.com>
+
+ * glib/goption.c (parse_arg): Convert filenames to UTF-8 on
+ Windows.
+
2004-10-29 Hans Breuer <hans@breuer.org>
* glibconfig.h */makefile.msc.in : updated [and finally fixed my
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 8c3b56610..1542390c8 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,8 @@
+2004-10-29 Matthias Clasen <mclasen@redhat.com>
+
+ * glib/goption.c (parse_arg): Convert filenames to UTF-8 on
+ Windows.
+
2004-10-29 Hans Breuer <hans@breuer.org>
* glibconfig.h */makefile.msc.in : updated [and finally fixed my
diff --git a/glib/goption.c b/glib/goption.c
index 931d5c89c..5905382ff 100644
--- a/glib/goption.c
+++ b/glib/goption.c
@@ -658,8 +658,14 @@ parse_arg (GOptionContext *context,
{
gchar *data;
+#ifdef G_OS_WIN32
+ data = g_locale_to_utf8 (value, -1, NULL, NULL, error);
+
+ if (!data)
+ return FALSE;
+#else
data = g_strdup (value);
-
+#endif
change = get_change (context, G_OPTION_ARG_FILENAME,
entry->arg_data);
g_free (change->allocated.str);
@@ -675,8 +681,14 @@ parse_arg (GOptionContext *context,
{
gchar *data;
+#ifdef G_OS_WIN32
+ data = g_locale_to_utf8 (value, -1, NULL, NULL, error);
+
+ if (!data)
+ return FALSE;
+#else
data = g_strdup (value);
-
+#endif
change = get_change (context, G_OPTION_ARG_STRING_ARRAY,
entry->arg_data);