[poppler] glib/poppler-annot.cc glib/poppler-form-field.cc

Carlos Garcia Campos carlosgc at kemper.freedesktop.org
Thu Jun 4 11:20:31 PDT 2009


 glib/poppler-annot.cc      |    2 +-
 glib/poppler-form-field.cc |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 50a7b4bcaa6e5f56cc25fe6936f9dc537a1b4b37
Author: Jeremy C. Reed <reed at reedmedia.net>
Date:   Thu Jun 4 20:19:03 2009 +0200

    [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.

diff --git a/glib/poppler-annot.cc b/glib/poppler-annot.cc
index d1bfbac..29051f9 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 d5c1975..4ed5b9e 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);


More information about the poppler mailing list