Kiran wrote:
I have a xml file with UTF-8 encoding it has some chineese data values
also. I wanted to change it to other encodings like UTF-16 ,GBK etc. I
used iconv utility in Unix for this ..but was not successful . Can
anybody provide some help regarding this ?.
Not successful in what way? Did iconv fail, or was the output incorrect?
You can transcode the file with a fairly simple XSLT transformation
using your favorite XSLT processor, essentially specifying a different
output encoding and copying everything from the source document:
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output encoding="utf-16" />
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*" />
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
--
Klaus Johannes Rusch
Kl********@atmedia.net http://www.atmedia.net/KlausRusch/