Without knowing the details about your code: If you are using a standard XSL
processor from your tag you should check that the output method setting of
your XSL is correct. This is the output method I use to produce HTML, and
you could modify it to produce the encoding you want:

        <xsl:output method = "html"
                indent = "yes"
                encoding = "UTF-16"
                doctype-system = "http://www.w3.org/DTD/HTML4-strict-dtd"
                doctype-public = "-//W3C//DTD HTML 4.0//DA"
                media-type= "text/html"
        />

Without this encoding my special characters get transformed aswell.
I know this is not where you suggest the problem lies - but have you checked
this issue?

R.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Ted Rice
Sent: 31. januar 2001 20:48
To: Orion-Interest
Subject: JSP TagLibs and UTF8 Encoding


I'm having an issue where a custom JSP BodyTag
used in JSP Pages is producing some undesirable
results. I am hoping someone out there has
already encountered a similar problem and can
point me in the right direction in solving mine.

The issue is that my custom JSP BodyTag is a wrapper
around JSP Code producing UTF8 Encoded XML Content.
Portions of this content is encoded in UTF8 because
they are language resources and this is the only
way they can be represented (e.g. ê and ? ). My JSP
Body Tag Implementation takes the produced XML Content
and processes it against an XSL Style Sheet to produce
the desired display content. However, the UTF8 Characters
are being munged and not displayed correctly.

The crux of the matter is how do I maintain the encoding
of the produced XML between the page being processed
and handing it of to the XSL Parser for transformation.
Currently I am trying to use something of the nature:

StringReader xmlReader       = new
StringReader(bodyContent.getString().trim());
InputSource  xmlInputSource  = new InputSource(xmlReader);

where the bodyContent is the standard internal JSP Tag extension
member variable.

I then used the created InputSource for any XML operations,
but my content still has munged UTF8 characters.

Anyone have any suggestions?

Thanks Greatly,

Ted

---
Ted Rice
APAMA Ltd, 17 Millers Yard, Mill Lane
Cambridge CB2 1RQ, United Kingdom
Email:  [EMAIL PROTECTED]
Mobile: +44 (0)7899 876489
Phone:  +44 (0)1223 257973 [Histon Office]
Fax:    +44 (0)1223 518859




Reply via email to