You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Torsten Erler <er...@net-linx.de> on 2002/11/13 15:07:55 UTC

Euro Sign Problem

Hi,

I use FOP in an intenationalized app. Therefore I tried to create
pdf-documents with locale German.
The currency symbols (Euro-Sign) doesn't appear correct in the result
(cryptic).
If I dump down the generated fo the values are already wrong.

Can anyone give me a pointer where I've to search for .

Have I to change some encodings?

xxx code snipped

ByteArrayOutputStream out =  new ByteArrayOutputStream();
String xml = data.toXML();  //data is a plain xml container with the same
structure like an xml-file
StringReader reader = new StringReader( xml );
Source xmlSource = new StreamSource( reader );
Result foResult = new StreamResult( out );
Transformer transformer = getTransformer( xslFilePath );
transformer.transform( xmlSource, foResult );


ThanX
Torsten Erler

Junior Software Developer
E-mail: mailto:Torsten.Erler@net-linx.de
Telephone: (+49) 351-31875-0
Direct: (+49) 351-31875-754
net-linx Europe GmbH
Kaethe-Kollwitz-Ufer 76
01309 Dresden, Germany


Re: Euro Sign Problem

Posted by Jeremias Maerki <de...@greenmail.ch>.
If I were you I'd generate SAX events from your "data" object. That
won't be difficulat to implement. The JAXP tutorial at Sun has good
examples. It will be a lot faster and will not likely generate many
problems with encodings.

I'm not sure but your code should work, IF you use the correct Unicode
character for the Euro Sign. Check out docs/examples/fonts.fo.

Good luck!

On Wed, 13 Nov 2002 15:07:55 +0100 Torsten Erler wrote:
> Hi,
> 
> I use FOP in an intenationalized app. Therefore I tried to create
> pdf-documents with locale German.
> The currency symbols (Euro-Sign) doesn't appear correct in the result
> (cryptic).
> If I dump down the generated fo the values are already wrong.
> 
> Can anyone give me a pointer where I've to search for .
> 
> Have I to change some encodings?
> 
> xxx code snipped
> 
> ByteArrayOutputStream out =  new ByteArrayOutputStream();
> String xml = data.toXML();  //data is a plain xml container with the same
> structure like an xml-file
> StringReader reader = new StringReader( xml );
> Source xmlSource = new StreamSource( reader );
> Result foResult = new StreamResult( out );
> Transformer transformer = getTransformer( xslFilePath );
> transformer.transform( xmlSource, foResult );


Jeremias Maerki