It seems that the gcj-4.5 java library is initialized before pdftk can
set LANG=C. So only setting LANG=C in the environment before starting
the pdftk seems to work.  However, with gcj-4.6 (Debian sid) the
workaround seems to work again.

The error in the gcj java runtime library can be easily reproduced by
the attached small java program.

It seems that all month abbreviation for LANG=de_DE are empty and it
crashes for LANG=de_AT between April and December which is clearly a bug
in gcj.

 $ gcj -C TestDateFormat.java
 $ LANG=de_DE gij TestDateFormat
 So.  29 12:57:20 MESZ 2011
 => empty Month abbreviation 

 $ LANG=de_AT gij TestDateFormat
 Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 4
   at java.text.SimpleDateFormat.formatWithAttribute(SimpleDateFormat.java:793)
   at java.text.SimpleDateFormat.format(SimpleDateFormat.java:845)
   at java.text.DateFormat.format(DateFormat.java:419)
   at TestDateFormat.main(TestDateFormat.java:12)
  => crash

 $ LANG=de_AT faketime "2010-3-1"  gij TestDateFormat
 Mo. M�r 01 00:00:00 GMT+01:00 2010
 => between January and March it "works", but with wrong encoding

 $ LANG=C gij TestDateFormat
 Sun May 29 12:54:42 GMT+02:00 2011
 => works anytime


** Attachment added: "Java test program to reproduce the bug in gcj java 
runtime library"
   
https://bugs.launchpad.net/ubuntu/+source/pdftk/+bug/779908/+attachment/2146700/+files/TestDateFormat.java

** Changed in: pdftk (Ubuntu)
       Status: Incomplete => Confirmed

** Also affects: gcj-4.5 (Ubuntu)
   Importance: Undecided
       Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/779908

Title:
  pdftk fails with "output" option

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to