[gimp/gimp-attributes-wip] plug-ins: attributes: handle locale<->utf-8
- From: Hartmut Kuhse <hartmutkuhse src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-attributes-wip] plug-ins: attributes: handle locale<->utf-8
- Date: Fri, 10 Oct 2014 07:59:27 +0000 (UTC)
commit c324d6ff5f977998274c628da167b54e96847249
Author: Hartmut Kuhse <hk_priv gmx de>
Date: Fri Oct 10 09:58:28 2014 +0200
plug-ins: attributes: handle locale<->utf-8
plug-ins/common/attributes.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/plug-ins/common/attributes.c b/plug-ins/common/attributes.c
index b9a8144..4d60a26 100644
--- a/plug-ins/common/attributes.c
+++ b/plug-ins/common/attributes.c
@@ -501,7 +501,10 @@ attributes_dialog_set_attributes (GimpAttributes *attributes,
tag_sorted = gimp_attribute_get_sortable_name (attribute);
value = gimp_attribute_get_interpreted_string (attribute);
- value_utf = g_locale_to_utf8 (value, -1, NULL, NULL, NULL);
+ if (! g_utf8_validate (value, -1, NULL))
+ value_utf = g_locale_to_utf8 (value, -1, NULL, NULL, NULL);
+ else
+ value_utf = g_strdup (value);
parent = attributes_get_parent (type, ifd);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]