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.
$ 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
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 ArrayIndexOutOf BoundsException : 4 SimpleDateForma t.formatWithAtt ribute( SimpleDateForma t.java: 793) SimpleDateForma t.format( SimpleDateForma t.java: 845) DateFormat. format( DateFormat. java:419) main(TestDateFo rmat.java: 12)
Exception in thread "main" java.lang.
at java.text.
at java.text.
at java.text.
at TestDateFormat.
=> 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