views:

281

answers:

3

I am using iso-8859-15 encoding both in xml data and in the xslt style sheet. But when I try convert XML doc to FO document 'œ' does'nt show up it shows up as '?' Below is the example of the problem I am facing.

The xml data is as follows: Nous sommes sous l'emprise du Divin cœur de Celui que mon fils vénère par-dessus

in the fo file the same line is generated as :

--------Nous sommes sous l'emprise du Divin c?ur de Celui que mon fils vénère par-dessus

As you see all the other accents are getting generated fine except for the 'œ'character.

Any help is greatly appreciated. This one issue is holding up a project.

A: 

Have you seen http://xmlgraphics.apache.org/fop/faq.html#pdf-characters ? It could be that you're simply using a font that doesn't have that character. See also http://xmlgraphics.apache.org/fop/stable/fonts.html on how to configure fonts.

However, given that you get a '?' and not a '#' for the missing character could indicate that there's an encoding problem. Sun JVMs usually replace characters that are not in an encoding by a '?'. You might want to consider switching to UTF-8 even though ISO 8859-15 should support the characters you want to use. Since I don't have access to your XML file here, I can't figure out if there's something wrong with it.

HTH

Jeremias Märki
Thanks for the input, I will try to check the font and also I will try with utf-8. Your help is appreciated.
A: 

Hi Guys,

I have a similar issue.. I have HTML stored in DB clob. I am retrieving that and converting to XHTML using TIDY.jar.

Once i got XHTML then using FOP i am converting to XSL-FO. Finally XSL-FO is rendering in PDF.

Previously everything is working fine with Linux-WAS5-java1.4. Recently we migrated the apps to Linux-WAS6-Java1.5. Now XHTML to XSL-FO is messing up everything. XSL-FO contains ???(Question marks) in the place of Euro, spase(nbsp), Agrave, egrave ..etc.

I tried changing the JVM encoding to UTF-8 and also i have modified my servlet request and response to support UTF-8. I am helfless and unable to figure where exactly the issue is coming out. Can someone please check this and suggest me some solution.

Ravi chandra
Not an answer to the question.
MSalters
A: 

Hi Ravi,

did u get any solution to this problem. Even i am facing exactly same problem.

Thanks Himanshu

himanshu
Not an answer to the question. You can see the proposed solution from Jeremias Märki.
MSalters