Sure, that all figures. You read from the database the character
sequence
'&' '#' '2' '2' '0' ';'. The text serializer send these characters
verbatim
to the output. The XML serializer has to ensure that the output is
wellformed
XML and escapes the '&' as "&".
To solve your immediate problem you can fixup the database input by
global
replaces in the XSP such as
text = text.replaceAll("Ü", "\u00DC");
Note that the & syntax is necessary in an XSP source file. In a
plain
Java file it would be
text = text.replaceAll("Ü", "\u00DC");
If you have a lot of different umlauts to fix it may be worthwhile to
program a function to handle all &#...; with a single regex.
The question remains why the database contains serialized XML text
rather
than Latin-1 or Unicode plain text. Can't you just fix the database
content?
HTH, Alfred.
-----Original Message-----
From: Dingjun Jia [mailto:[EMAIL PROTECTED]
Sent: Dienstag, 11. Juli 2006 21:38
To: [email protected]
Subject: AW: How to avoid the encoded text Ü in pdf generation
The text in the database is Ü and not modified by the JDBC driver,
because if i use the following, I get text Ü.
<map:match pattern="test.txt">
<map:generate src="test/test.xsp" type="serverpages"/>
<!-- In the test.xsp i just only used esql to get the data from databse.
-->
<map:serialize type="text"/>
</map:match>
If i use xml serializer, not text serilaizer, i get text &#220; .
So i suspect, the transform step (<map:transform src="test/pdf.xsl"
type="xslt" />) expects a xml file, so the first step
(<map:generate src="test/test.xsp" type="serverpages"/>) will generate a
xml
file, and the text in this xml file is then &220; .
which possibilities should I try to tweak the xsp?
Thanks!
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
This message is for the named person's use only. It may contain confidential,
proprietary or legally privileged information. No confidentiality or privilege
is waived or lost by any mistransmission. If you receive this message in error,
please notify the sender urgently and then immediately delete the message and
any copies of it from your system. Please also immediately destroy any
hardcopies of the message. You must not, directly or indirectly, use, disclose,
distribute, print, or copy any part of this message if you are not the intended
recipient. The sender's company reserves the right to monitor all e-mail
communications through their networks. Any views expressed in this message are
those of the individual sender, except where the message states otherwise and
the sender is authorised to state them to be the views of the sender's company.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]