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

getting undisered results , when trying to display japanese characters

  • To: <xml-dev@l...>
  • Subject: getting undisered results , when trying to display japanese characters
  • From: "asim" <qazi@a...>
  • Date: Fri, 28 Feb 2003 12:47:10 -0800

japnese characters

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>] &#32;&#32;
     [<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">&#32;</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 :)
http://www.hostingcontroller.com

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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.