A
ASP
Why this code doesn't work ? The "testUnicode.asp" file is in Unicode UTF-8
and use the Normalization Form C with the Byte Order Mark (BOM, or Unicode
Signature).
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<%
Const ForReading = 1, TristateTrue = -1
Dim fso
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Dim objTextStream
Set objTextStream = fspenTextFile(Server.MapPath("testUnicode.asp"),
ForReading, False, TristateTrue) ' -1 = Open file for reading in unicode
Response.Write(objTextStream.ReadAll)
objTextStream.Close
Set objTextStream = Nothing
Set fso = Nothing
%>
</body>
</html>
Thanks a lot !!!!
J.-Luc
and use the Normalization Form C with the Byte Order Mark (BOM, or Unicode
Signature).
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<%
Const ForReading = 1, TristateTrue = -1
Dim fso
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Dim objTextStream
Set objTextStream = fspenTextFile(Server.MapPath("testUnicode.asp"),
ForReading, False, TristateTrue) ' -1 = Open file for reading in unicode
Response.Write(objTextStream.ReadAll)
objTextStream.Close
Set objTextStream = Nothing
Set fso = Nothing
%>
</body>
</html>
Thanks a lot !!!!
J.-Luc