Bug 40106 - PDF crash in PDFText class
Summary: PDF crash in PDFText class
Status: CLOSED FIXED
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: pdf (show other bugs)
Version: 0.92
Hardware: All other
: P2 normal
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-24 21:29 UTC by Jeroen
Modified: 2012-04-01 07:03 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeroen 2006-07-24 21:29:23 UTC
When rendering any .fo file with text in it AND using a font specified in the
userconfig file, the PDFText class throws an exception. This happens not on a PC
with jre 1.5 but does on Linux, running
java version "1.4.2"
gij (GNU libgcj) version 4.0.1 20050727 (Red Hat 4.0.1-5)
I finally nailed it on line 

   uniBytes = new String(a).getBytes("UnicodeBigUnmarked");

It seems that particular JVM implementation does not support that character
encoding. When I changed it to

   uniBytes = new String(a).getBytes("UTF-16BE");

UTF-16BE being the new notation worked on PC **and** the linux box
Comment 1 Christian Geisert 2006-07-25 07:17:11 UTC
Mmmh, looking at http://java.sun.com/j2se/1.3/docs/guide/intl/encoding.doc.html
and http://java.sun.com/j2se/1.5.0/docs/guide/intl/encoding.doc.html its looks
like a conforming JVM should support both encodings.
UnicodeBigUnmarked is the Canonical Name for the java.lang API but if this is
the only problem which prevents gcj from running FOP I'm ok with the change.
Other opinions?
Comment 2 Jeremias Maerki 2006-07-26 06:50:34 UTC
Yes, I think this is a safe change. "UnicodeBigUnmarked" is a synonym for
"UTF-16BE". There's another reference about which encodings must be supported by
a JVM: http://java.sun.com/j2se/1.3/docs/api/java/lang/package-summary.html#charenc

Still, GNU Classpath would do good to add those synonyms, too.
Comment 3 Jeremias Maerki 2006-07-28 10:04:03 UTC
Change done: http://svn.apache.org/viewvc?rev=426465&view=rev

Thanks!
Comment 4 Glenn Adams 2012-04-01 07:03:37 UTC
batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed