[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: i18n problem while displaying using stylesheet

Subject: RE: i18n problem while displaying using stylesheet
From: "Passin, Tom" <tpassin@xxxxxxxxxxxx>
Date: Fri, 25 Jun 2004 10:34:17 -0400
xslt i18n
> From: Ranjan K. Baisak [mailto:ranjanbaisak@xxxxxxxxx] 
>           My xml contains following elements with japanese 
> characters. 
> <country
> name="&#20837;&#21147;&#26989;&#21209;&#24037;&#25968;&#12398;
> &#21066;&#38500;"
> nameindex="1" />
> <country
> name="&#20837;&#21147;&#26989;&#24037;&#25968;&#12398;&#21066;
> &#38500;"
> nameindex="2" />
> I need to display japanese charachers as it is. My stylesheet 
> displays acsii characters not japanese characters when it 
> converts xml to html.

It is not the stylesheet that displays the characters.  It is your
browser or editor or other application that handles the display.  To
display as intended, the encoding has to be correct and the application
has to have the right font available.

As a test, I modified your xml file to use elements only, like this -

<data>
<country>&#20837;&#21147;&#26989;&#21209;&#24037;&#25968;&#12398;&#21066
;&#38500;</country>
<country>&#20837;&#21147;&#26989;&#24037;&#25968;&#12398;&#21066;&#38500
;</country>
</data>

Then I opened this file in my Firefox browser, running on Windows2000.
The japanese characters displayed as japanese characters.  This verifies
that my system is able to display them correctly.  The xslt processor
may change the character references to the corresponding actual
characters, but that will not affect the display in a browser.  You can
verify that easily by running a simple identity transformation.

You have not shown us (a simplified version of) your stylesheet, but
perhaps it declares an inappropriate encoding for the output.
Alternatively, if you are working in a development editor that displays
the results of the transformation, it may not be able to display the
characters properly.  This is the case for XML Cooktop (at last, for the
older version).

Your problem is very likely one of these two alternatives.  Most likely
it is simply the application you are using for display.

Cheers,

Tom P

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.