summaryrefslogtreecommitdiff
path: root/glib
diff options
context:
space:
mode:
authorJeremy C. Reed <reed@reedmedia.net>2009-06-04 20:19:03 +0200
committerCarlos Garcia Campos <carlosgc@gnome.org>2009-06-04 20:19:03 +0200
commit50a7b4bcaa6e5f56cc25fe6936f9dc537a1b4b37 (patch)
treee9b7b0da3587a55b40db384127cc50ffbdb7db55 /glib
parent2cf9e6a2318b770ae62572944c687576d1801d31 (diff)
[glib] Hyphenate UTF-8 and UTF-16BE
Fixes bug #21953. where iconv() is called to fill in a text field, use "UTF-8" and "UTF-16BE" as encoding names rather than the less portable "UTF8" and "UTF16BE" -- this makes it work on NetBSD.
Diffstat (limited to 'glib')
-rw-r--r--glib/poppler-annot.cc2
-rw-r--r--glib/poppler-form-field.cc4
2 files changed, 3 insertions, 3 deletions
diff --git a/glib/poppler-annot.cc b/glib/poppler-annot.cc
index d1bfbace..29051f95 100644
--- a/glib/poppler-annot.cc
+++ b/glib/poppler-annot.cc
@@ -270,7 +270,7 @@ poppler_annot_set_contents (PopplerAnnot *poppler_annot,
g_return_if_fail (POPPLER_IS_ANNOT (poppler_annot));
- tmp = contents ? g_convert (contents, -1, "UTF16BE", "UTF8", NULL, &length, NULL) : NULL;
+ tmp = contents ? g_convert (contents, -1, "UTF-16BE", "UTF-8", NULL, &length, NULL) : NULL;
goo_tmp = new GooString (tmp, length);
g_free (tmp);
poppler_annot->annot->setContents (goo_tmp);
diff --git a/glib/poppler-form-field.cc b/glib/poppler-form-field.cc
index d5c1975d..4ed5b9ec 100644
--- a/glib/poppler-form-field.cc
+++ b/glib/poppler-form-field.cc
@@ -279,7 +279,7 @@ poppler_form_field_text_set_text (PopplerFormField *field,
g_return_if_fail (field->widget->getType () == formText);
- tmp = text ? g_convert (text, -1, "UTF16BE", "UTF8", NULL, &length, NULL) : NULL;
+ tmp = text ? g_convert (text, -1, "UTF-16BE", "UTF-8", NULL, &length, NULL) : NULL;
goo_tmp = new GooString (tmp, length);
g_free (tmp);
static_cast<FormWidgetText*>(field->widget)->setContent (goo_tmp);
@@ -552,7 +552,7 @@ poppler_form_field_choice_set_text (PopplerFormField *field,
g_return_if_fail (field->widget->getType () == formChoice);
- tmp = text ? g_convert (text, -1, "UTF16BE", "UTF8", NULL, &length, NULL) : NULL;
+ tmp = text ? g_convert (text, -1, "UTF-16BE", "UTF-8", NULL, &length, NULL) : NULL;
goo_tmp = new GooString (tmp, length);
g_free (tmp);
static_cast<FormWidgetChoice*>(field->widget)->setEditChoice (goo_tmp);