[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: UTF-16 -> UTF-8
> I have a problem where my DB is stored as UTF-16 but as I'm using asp-pages > I need to change charset code to UTF-8. How can I do this? Using XSLT or > what? It's pretty simple in XSLT; just set the encoding attribute of the xsl:output element. Below is an identity stylesheet that writes its output as UTF-8. Keep in mind that not all XSLT processors can write to all encodings, but they are supposed to give you an error message if they can't handle the setting of the encoding attribute. According to the XSLT Rec, they all have to "respect values of UTF-8 and UTF-16," but not all can handle UTF-16. (In general, the XSL-list at http://www.mulberrytech.com/xsl/xsl-list/ is the place where XSLT questions will get the quickest answers.) Bob DuCharme www.snee.com/bob <bob@ snee.com> see http://www.snee.com/bob/xsltquickly for info on new book "XSLT Quickly" from Manning Publications. <!-- ~~~~~~~~~~~~~~~~~~~~~ --> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output encoding="utf-8"/> <xsl:template match="@*|node()"> <xsl:copy> <xsl:apply-templates select="@*|node()"/> </xsl:copy> </xsl:template> </xsl:stylesheet>
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|