Chilkat HOME ASP Visual Basic VB.NET C# Visual C++ C MFC Delphi FoxPro Java Perl PHP Python Ruby SQL Server VBScript
|
Convert utf-8 to Shift_JIS ASP example code to load a utf-8 text file, convert it to Shift-JIS, and display it in a Japanese ASP page. <html>
<head>
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=Shift_JIS">
<title>Send Japanese Email</title>
</head>
<body bgcolor="#FFFFFF">
<%
set cc = Server.CreateObject("ChilkatCharset2.ChilkatCharset2")
' Any value passed to UnlockComponent begins the 30-day trial.
cc.UnlockComponent "30-day trial"
utf8Data = cc.ReadFile("C:/temp/utf8JapaneseSample.txt")
cc.FromCharset = "utf-8"
cc.ToCharset = "Shift_JIS"
Response.BinaryWrite cc.ConvertData(utf8Data)
%>
</body>
</html>
|
Need a specific example? Send a request to support@chilkatsoft.com
© 2000-2008 Chilkat Software, Inc. All Rights Reserved.