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 Niels Verdonk <Ni...@ctp.com> on 2002/07/12 15:53:32 UTC

Betr.: Re: Strange encoding problem

Hi Jianbo,

I'm doing that in fact, but thanks for the suggestion.

As far as your suggestion to use latin-8 throughout, I have also tried
that, including reading the resultset from the database like:
val = new String(rs.getString(1).getBytes("8859_9"));
But In this case I see ? or # for the turkish characters, at least I see
the Icelandic ones when using UTF8.

Also I imagine I have to specify the latin-5 encoding at least
somewhere, but I can't see a property in the configuration settings for
FOP.

I've also played with the config.xml stream-filter-list settings, not
sure if that would help ,but no.

I'm out of options I feel, Anyone? Please,

Thanks,

Niels


>>> jmao@checkfree.com 12-7-2002 14:03 >>>

Did you make sure you read the fo file in in UTF-8 encoding, such as
InputStreamReader(new FileInputStream(inputFile),"UTF-8").

Another suggestion why don't you use latin-5 throughout from data
retrieval?


Jianbo Mao



|---------+---------------------------->
|         |           "Niels Verdonk"  |
|         |           <Niels.Verdonk@ct|
|         |           p.com>           |
|         |                            |
|         |           12/07/2002 12:11 |
|         |           Please respond to|
|         |           fop-user         |
|         |                            |
|---------+---------------------------->
 
>-----------------------------------------------------------------------------------------------------------------------------|
  |                                                                     
                                                       |
  |       To:       <fo...@xml.apache.org>                           
                                                       |
  |       cc:                                                           
                                                       |
  |       Subject:  Strange encoding problem                            
                                                       |
 
>-----------------------------------------------------------------------------------------------------------------------------|




Hi,

I've got a problem with latin-5 encoding. (latin-5 is an extension of
latin-1 which replaces 6 icelandic characters with turkish ones.)

I export UTF-8 from the database to an XML document (using an
OutputStreamWriter with encoding UTF8).

When I view the XML document with ISO-8859-9 encoding I see the turkish
characters properly. This document is transformed to FO using XSL ,using
UTF-8 encoding by setting:
<xsl:output method="xml" encoding="utf-8"/>

Again when I view this document with ISO-8859-9 ecoding I see the
turkish characters properly.

But in the PDF generated, the charaters are displayed as the latin-1
icelandic characters.

Can anyone tell me where I'm going wrong?

Thanks,

Niels







Re: Betr.: Re: Strange encoding problem

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Niels Verdonk wrote:
> As far as your suggestion to use latin-8 throughout, I have also tried
> that, including reading the resultset from the database like:
> val = new String(rs.getString(1).getBytes("8859_9"));
> But In this case I see ? or # for the turkish characters, at least I see
> the Icelandic ones when using UTF8.

Where do you see a "#"? In the generated PDF? This indicates
that there are no glyphs in the fon you use for this characters,
which is not very surprising (the standard fonts don't have much
glyphs for characters outside ISO-8859-1 range).

> Also I imagine I have to specify the latin-5 encoding at least
> somewhere, but I can't see a property in the configuration settings for
> FOP.

You declare the encoding in the XML source file. There is no
other possibility to set an encoding (for input). The FO
processor itself gets Unicode characters from the XML parser
and doesn't even know about encodings.

> I've also played with the config.xml stream-filter-list settings, not
> sure if that would help ,but no.

The stream-filter-list is a feature under development for
getting images into the result, they have nothing to do with
character input or encodings.

>>>>jmao@checkfree.com 12-7-2002 14:03 >>>
Duh! You are supposed to trim old unnecessary quotes.

J.Pietschmann