Package: pdftk
Version: 1.40-3
Severity: normal
Tags: patch l10n

pdftk's UpdateInfo expects all of its info to be plain ASCII. This
causes problems with UTF-8 characters (e.g. a u with an umlaut (U+00FC)
which is input as 0xC3BC will be converted to 0xFFC3 0xFFBC) which is
inconvenient for authors who have accented characters in their names.

The attached patch is only a partial fix - it uses JvNewStringUTF which
works as long as the input is UTF-8 or ASCII. I haven't had time to work
on a better fix which would convert the input based on $LANG as it's far
less painful to do that in the Perl-portion of our workflow.

-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (990, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-5-686
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages pdftk depends on:
ii  libc6                  2.3.6.ds1-13etch4 GNU C Library: Shared libraries
ii  libgcc1                1:4.1.1-21        GCC support library
ii  libgcj7-0              4.1.1-20          Java runtime library for use with 
ii  libstdc++6             4.1.1-21          The GNU Standard C++ Library v3

pdftk recommends no packages.

-- debconf-show failed
--- pdftk/report.cc     2006-09-05 15:49:32.000000000 -0700
+++ pdftk-1.40/pdftk/report.cc  2008-01-16 18:41:41.278928000 -0800
@@ -1222,13 +1222,8 @@
                                                                info_p->remove( 
new itext::PdfName( JvNewStringLatin1(it->first.c_str()) ) );
                                                        }
                                                        else {
-                                                               const jsize 
jvs_size= 4096;
-                                                               jchar 
jvs[jvs_size];
-                                                               jsize jvs_len= 
0;
-                                                               
string_to_jcharstring( jvs, jvs_size, &jvs_len, it->second );
-
                                                                info_p->put( 
new itext::PdfName( JvNewStringLatin1(it->first.c_str()) ),
-                                                                               
                                 new itext::PdfString( JvNewString(jvs, 
jvs_len), itext::PdfObject::TEXT_UNICODE ) );
+                                                                               
                                 new itext::PdfString( 
JvNewStringUTF(it->second.c_str()), itext::PdfObject::TEXT_UNICODE ) );
                                                        }
                                                }
                                }

Reply via email to