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

RE: I18N / UTF-8 versus US-ASCII

Subject: RE: I18N / UTF-8 versus US-ASCII
From: "Sangal, Amit (STSD)" <amit.sangal@xxxxxx>
Date: Tue, 18 Apr 2006 17:13:49 +0530
transformerfactory utf 8
Hi Alex,

1) If I save the file and open with IE6, I see right Korean characters.

2) I tried the URL sent by you and this URL do highlight the character
used in my test case.

3) I am using xalan and xerces.

Following is the code used for transformation.

TransformerFactory tFactory = TransformerFactory.newInstance();
			Transformer transformer =
tFactory.newTransformer(new
StreamSource(OVSNAdapterConfiguration.ovsnServiceXSLFile));
			String hostName = AdapterUtil.getHostAddress();
			transformer.setParameter("sourceName",	/*
parameter name */

hostName+"/"+dataSourceName /* parameter value */ );
			output = new ByteArrayOutputStream();
			byte[] bytes = message.getBytes("UTF8");
			transformer.transform(new StreamSource(new
ByteArrayInputStream(bytes)), new StreamResult(output));


Do you see any problem with the code which can cause loss of Unicode?

Regards,
Amit


-----Original Message-----
From: Alexander Johannesen [mailto:alexander.johannesen@xxxxxxxxx]
Sent: Tuesday, April 04, 2006 4:04 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re:  I18N / UTF-8 versus US-ASCII

On 4/4/06, Sangal, Amit (STSD) <amit.sangal@xxxxxx> wrote:
> I do have Korean character pack installed on my machine.

If you save this file and view it with your favourite browser, what do
you get?

<html>
	<head>
		<title>Korean test</title>
		<meta http-equiv="Content-Type" content="text/html;
charset=utf-8">
	</head>
	<body>
		[&#54504;&#53552;]
	</body>
</html>

Also, try
http://www.isthisthingon.org/unicode/index.phtml?page=D&subpage=4&hilite
=D4E8
which will highlight the character you're interested in the test case.

If this is all and well, somewhere in the pipe between XML input and
through to the output of your processor the unicode gets lost. What
processor and parsers etc are you using?


Alex
--
"Ultimately, all things are known because you want to believe you know."
                                                         - Frank Herbert
__ http://shelter.nu/ __________________________________________________

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.