You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by "Stoaks, Max" <St...@gsb.stanford.edu> on 2004/06/01 21:22:52 UTC

Character problems

Help!

I'm transforming xml results that are encoded in UTF-8 using my xslt stylesheet that also specifies UTF-8. The output of the transform is html which is displayed in a browser.  Unfortunately, I'm getting weird handling for certain charachters like ellipsis and em dash. They show up as garbage in the browser ( IE 6). I've tried changing the xsl:output method and encoding but that doesn't seem to help.

Are there some other settings I can try? Or maybe is this happening in the parser and not the xformer?

I'm using Xalan-j 2.6.0.

Thanks for any and all help!

Max

RE: Character problems

Posted by "F. Andy Seidl" <fa...@myst-technology.com>.
How are you delivering the resulting HTML document to the browser?  If you
are sending the response to an HTTP GET request, make sure you are setting
content type based on the media-type of the transformer...

    Transformer transformer_,
    HttpServletResponse response_
    ...
    String mediaType = transformer_.getOutputProperty("media-type");
    response_.setContentType(mediaType);

If that's not the problem, then do you have an example input document and
stylesheet that demonstrate the problem?  I've had several encoding issues
that I thought might be problems in Xalan and/or Xerces, but in each case,
it turned out to be my problem.
-- fas
F. Andy Seidl, Co-founder
MyST Technology Partners
Creators of MySmartChannels



---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org