Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: [xsl] I18N / UTF-8 versus US-ASCII

From: "Sangal, Amit (STSD)" <amit.sangal@------>
To:
Date: 4/4/2006 11:06:00 AM
1) If I save the file and open with IE6, I get following message

"An invalid character was found in text content"

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();
			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: [xsl] 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/ __________________________________________________


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent