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 Ru...@sonynetservices.com on 2002/03/29 09:56:38 UTC

Mapping strange characters

Hi all,

maybe an stupid question, but I cannot find the answer...

I have an XML with characters like ™ (trademak sign) and •
(bullet), displayable in HTML. I've an XSL that creates a .fo out of the
XMLs, but when trying to display these characters, the PDF shows the #
symbol.

I had a look at the fonts and it turns out that those characters should be
encoded in PDF as &#x2122 and &#x2022 respectively (in the fonts provided
by default).

Is there any way to map these characters (and not only these ones, but much
more) to the correct represenation in PDF?, do I have to try another
font?...

A little bit of help will be very helpful,
thanks.

Ruben





Re: Mapping strange characters

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Ruben_Inoto@sonynetservices.com wrote:
> I have an XML with characters like &#153; (trademak sign) and &#149;
> (bullet), displayable in HTML.
These characters will only display correctly on machines
running windows and with certain "helpful" browsers.

> I've an XSL that creates a .fo out of the
> XMLs, but when trying to display these characters, the PDF shows the #
> symbol.
IIRC the Unicode charpoints actaully aren't assigned any glyphs,
for compatibility with ISO-8859, the "#" is displayed by Acrobat
Reader if it can't find a glyph.

> I had a look at the fonts and it turns out that those characters should be
> encoded in PDF as &#x2122 and &#x2022 respectively (in the fonts provided
> by default).
> Is there any way to map these characters (and not only these ones, but much
> more) to the correct represenation in PDF?, do I have to try another
> font?...

As for terminology: &#x2122 and &#x2022 represent Unicode codepoints,
and are used in the XML source. FOP will map them during formatting
to something which can be put into the PDF.
FOP 0.20.3 handles both characters perfectly.

J.Pietschmann