Hi,
I'm having a bit of trouble writting the copyright symbol to a text file here is a cut down version of my page
Strangely when I write "©" to file the "©" gets written, but the "Â" is ignored????
Any help will greatly appreciatedCode:<%@ Language="vbscript" codepage=65001 %> <% Option Explicit Response.Buffer=True %> <!DocType html Public "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title></title> <meta http-equiv="content-type" content="text/html;charset=utf-8"> </head> <body> <% Call WriteToFile("First: ""©""" & vbNewLine,"c:\temp\","testdata.txt",True) Call WriteToFile("Second: ""©""" & vbNewLine,"c:\temp\","testdata.txt",False) %> </body> </html> <% Sub WriteToFile(sWhat, sPath, sFName, bOverwrite) Dim oFile ' File Object Dim oOut ' File Out Stream Const ForReading=1 Const ForWriting=2 Const ForAppending=8 Set oFile = Server.CreateObject("Scripting.FileSystemObject") Set oOut = oFile.OpenTextFile(sPath & sFName, IIf(bOverwrite,ForWriting,ForAppending), True) oOut.Write(sWhat) oOut.Close Set oOut = Nothing Set oFile = Nothing End Sub Function IIf(expr,var1,var2) If expr Then IIf=var1 Else IIf=var2 End Function %>
Cheers Al




Reply With Quote