this my XSL file with japnese characters. if I
transform it (my transformation funtions is wriiten bellow the file) it
shows me "?" question marks , plz help, i did saved this file as UTF-8 and using
win2k notepad.
But if i save this file as .htm and the see it in
in IE browser it shows the japanese character fine .... i have IE 6 SP1 and
Msxml 4.0
<?xml
version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"> <xsl:output method="html" version="4.0"
encoding="utf-8"/> <xsl:variable
name="home-link">家</xsl:variable> <xsl:variable
name="help-link">助</xsl:variable> <xsl:variable
name="signout-link">印</xsl:variable> <xsl:template
match="data"> <html> <head> <!--<meta
HTTP-EQUIV="Content-Type" Content="text-html;
charset=ISO-8859-1"/>--> <meta HTTP-EQUIV="Content-Type"
Content="text-html; charset=UTF-8"/> <!--<meta
http-equiv="Content-Type"
content="text/html;CHARSET=euc-jp"/>--> <link rel="stylesheet"
type="text/css"> <xsl:attribute
name="href"> <xsl:value-of
select="//main-css-path"/> </xsl:attribute>
</link>
</head> <body> <table
width="100%" border="0" height = "71" cellspacing="0"
cellpadding="3"> <tr valign="middle"
class="bgcolor"> <td width="36%"
height="30" align="right" valign="middle"
class="IconText"> [<a href="Contents.asp"
target="main" class="IconText"> <b>
<xsl:value-of select="$home-link"/> </b></a>]
   [<a
href="default.asp?action=1" target="_top"
class="IconText"> <b> <xsl:value-of
select="$signout-link"/>
</b></a>] </td> <td
width="3%"
height="30"> </td> </tr> </table> </body> </html> </xsl:template> </xsl:stylesheet>
The Transformation Code IS
function TransformDocumentSimple(srcXML,
srcXSL) Dim sourceFile, styleFile, source 'the xsl
file path styleFile = srcXSL set source =
Server.CreateObject("MSXML2.DOMDocument.4.0") source.async =
false source.loadXML srcXML 'Get The Style
Object set style =
Server.CreateObject("MSXML2.DOMDocument.4.0") style.async =
false style.load styleFile 'Error
Handaling if (source.parseError.errorCode <> 0)
then 'result =
reportParseError(source.parseError) set oerr =
source.parseError sErrMsg = "XML Parsing Error. File: "
& oErr.url & " Reason : " & oErr.reason & " Line: " &
oErr.line & ", Character: " & oErr.linepos & ", Text: " &
oErr.srcText Response.Write sErrMsg elseif
(style.parseError.errorCode <> 0) then 'result =
reportParseError(style.parseError) set oerr =
style.parseError sErrMsg = "XML Parsing Error. File: "
& oErr.url & " Reason : " & oErr.reason & " Line: " &
oErr.line & ", Character: " & oErr.linepos & ", Text: " &
oErr.srcText Response.Write sErrMsg
else 'on error resume next result =
source.transformNode(style) if (err.number<>0)
then result =
reportRuntimeError(exception) end if end
if 'Make the result TransformDocumentSimple = result End
Function
function reportParseError(strError) Response.Write strError &
"<br>" end function
Plz help i wanna make my work multilingual :)
|