Chilkat
HOME
Android™
ASP
Visual Basic
VB.NET
C#
iOS (IPhone)
Objective-C
C++
C
MFC
Delphi
FoxPro
Java
Perl
PHP Extension
PHP ActiveX
Python
PowerShell
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("Chilkat.Charset2")
' 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>
|
© 2000-2012 Chilkat Software, Inc. All Rights Reserved.