-
ASP Response.Write and UTF-8
I need to express Greek text in an .asp-written website. I can't save an .asp file in unicode, so I need to read a .txt file that IS saved in unicode which will preserve the Greek characters. Both the .asp page and the unicode .txt file are stored in the same folder on the web host.
The script code from w3schools:
<%
Set FS = Server.CreateObject("Scripting.FileSystemObject")
Set RS = FS.OpenTextFile(Server.MapPath("text") & "\TextFile.txt",1)
While not rs.AtEndOfStream
Response.Write RS.ReadLine
Response.Write("<br />")
Wend
%>
modified to:
<%
Set FS = Server.CreateObject("Scripting.FileSystemObject")
Set RS = FS.OpenTextFile(htdocs("text") & "\About1GR.txt",1)
While not rs.AtEndOfStream
Response.Write RS.ReadLine
Response.Write("<br />")
Wend
%>
The ramifications of this script are beyond me, and I don't know what specific modifications are needed to make it work.
Any suggestions? Or maybe a more efficient way to accomplish this?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules