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 jb <li...@sur-mokka.dk> on 2003/07/28 13:50:33 UTC
Special charecters into FOP
Hi
Think this question has been asked before...
But anyway...
I've have a problem getting special charecters show correct in the PDF
generated by FOP.
To not make the XML import file corrupt i change all special chars to f.ex.
char(38) = & = & etc.
i've also tried this
char(38) = & = & should equal the Adobe standard font.
but the PDF just shows &
what am i doing wrong here ?
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: Special charecters into FOP
Posted by jb <li...@sur-mokka.dk>.
Arh..
Sorry, i've found the error.
the script generating the xml file, parsed the text for special chars twice.
make & = &#38;
my mistake
thanx anyway
On Monday 28 July 2003 20:25, J.Pietschmann wrote:
> jb wrote:
> > To not make the XML import file corrupt i change all special chars to
> > f.ex.
>
> ...
>
> > char(38) = & = & should equal the Adobe standard font.
> >
> > but the PDF just shows &
>
> This sounds suspiciously as if you don't feed a file
> through an XML parser but use a DOM or the SAX API
> instead as FOP input.
> Character references (and entity references) apply to
> serialized XML only. In the XML APIs, text (text nodes
> or character events) contain normal, unescaped Unicode
> strings.
>
> J.Pietschmann
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: fop-user-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: Special charecters into FOP
Posted by "J.Pietschmann" <j3...@yahoo.de>.
jb wrote:
> To not make the XML import file corrupt i change all special chars to f.ex.
...
> char(38) = & = & should equal the Adobe standard font.
>
> but the PDF just shows &
This sounds suspiciously as if you don't feed a file
through an XML parser but use a DOM or the SAX API
instead as FOP input.
Character references (and entity references) apply to
serialized XML only. In the XML APIs, text (text nodes
or character events) contain normal, unescaped Unicode
strings.
J.Pietschmann
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
RE: Special charecters into FOP
Posted by Victor Mote <vi...@outfitr.com>.
jb wrote:
> I've have a problem getting special charecters show correct in the PDF
> generated by FOP.
>
> To not make the XML import file corrupt i change all special
> chars to f.ex.
> char(38) = & = & etc.
> i've also tried this
> char(38) = & = & should equal the Adobe standard font.
>
> but the PDF just shows &
>
> what am i doing wrong here ?
AFAICT, either of them should work. However, I am suspicious of the
char(38). That looks like it is part of a program instead an XML document
(but maybe you are just showing the decimal equivalent). If you are trying
to encode the value in Java, use the hex value "\u0026" or just the
character "&" in your string. BTW, there is also an & entity for this
purpose. See
http://xml.apache.org/fop/fo.html#xml-entity-chars
for more details.
Another possibility is that you are getting the character encoded in your
semantic XML document correctly, but that it is being transformed
incorrectly when you convert to XSL-FO. Check the XSL-FO document to see
whether the problem occurs before or after that point:
http://xml.apache.org/fop/running.html#check-input
If it occurs before that point, then you really have an XSLT question.
Otherwise, please make sure you are running the latest version of FOP, then
post back to this list with a 2-3 line snippet showing the context (more if
needed).
Victor Mote
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org