Project

Profile

Help

Processing Japanese Characters

Added by Anonymous about 19 years ago

Legacy ID: #3090841 Legacy Poster: vanfleet (vanfleet)

I’m having a problem with the html output of Japanese characters. The Japanese XML file being processed is encoded as native character UTF-8, but the html file being generated is coming out as numeric character entities, for example: & #23550; & #35937; & #32773;. I’m processing these files with Saxonb 8.2 (I tried using the latest release but it blew up on me). The output element for the html looks like the following. <xsl:output method="html" name="html" indent="yes" encoding="UTF-8" media-type="text/html" /> The strange thing about this is that files I’m outputting as text and XML are coming out as I want them, as native character UTF-8. The output element for these are: <xsl:output method="text" name="text" indent="no" encoding="UTF-8"/> <xsl:output method="xml" name="xml" indent="yes" encoding="UTF-8"/> Can someone tell me what I can do to make the html output native character UTF-8. Any help here would be appreciated. Thanks, David Vanfleet


Replies (2)

RE: Processing Japanese Characters - Added by Anonymous about 19 years ago

Legacy ID: #3090888 Legacy Poster: Michael Kay (mhkay)

Try setting saxon:character-representation="native;native" as an extra attribute on xsl:output. In the past the serialization spec didn't constrain the serializer when outputting special characters and I chose to use numeric or symbolic character references because so many people configure their web servers incorrectly and this reduces the problems they hit. But in the latest drafts, the spec does say that a character that can be natively encoded should be natively encoded, and I will change the product to match. If you had problems running a stylesheet under 8.4 then I would like to know about it please! Michael Kay

RE: Processing Japanese Characters - Added by Anonymous about 19 years ago

Legacy ID: #3091196 Legacy Poster: vanfleet (vanfleet)

That did exactly what I needed, thanks for such a quick response! Also, I’ve done some digging into the problem I’m having with processing with Saxonb 8.4, I’ll post that information to a new thread since it’s not related to this one. Thanks, David Vanfleet

    (1-2/2)

    Please register to reply