2011-05-18

ASP with UTF-8

...

讀取 utf-8 編碼的文字檔
<%
Dim oStream
Set oStream = Server.CreateObject("ADODB.Stream")
oStream.Type=2
oStream.mode=3
oStream.CharSet = "utf-8"
oStream.Open
oStream.LoadFromFile Server.MapPath("utf-8.txt")
Do Until oStream.EOS
  response.write oStream.ReadText(-2)
Loop
oStream.Close
Set oStream = Nothing
%>

0 意見: