J
JTMar
I need to save a file in UTF-8 format from an ASP file.
Using FileSystemObject I can only save them in Unicode (UTF-16, I think) but
not in UTF-8:
Set zzzz = fspenTextFile(filepath, 2, true, -1)
How do I can save my file in UTF-8 format ?
I have tried to convert the file to UTF-8, with this code:
Dim objStream
Set objStream = Server.CreateObject("ADODB.Stream")
objStream.Open
objStream.Type = adTypeText
objStream.Position = 0
objStream.Charset = "utf-8"
objStream.LoadFromFile filepath
objStream.SaveToFile filepath, adSaveCreateOverWrite
objStream.Close
set objStream = nothing
But, that code doesn't do anything and no error occurs. :-?
Thanks in advance for your replays
Using FileSystemObject I can only save them in Unicode (UTF-16, I think) but
not in UTF-8:
Set zzzz = fspenTextFile(filepath, 2, true, -1)
How do I can save my file in UTF-8 format ?
I have tried to convert the file to UTF-8, with this code:
Dim objStream
Set objStream = Server.CreateObject("ADODB.Stream")
objStream.Open
objStream.Type = adTypeText
objStream.Position = 0
objStream.Charset = "utf-8"
objStream.LoadFromFile filepath
objStream.SaveToFile filepath, adSaveCreateOverWrite
objStream.Close
set objStream = nothing
But, that code doesn't do anything and no error occurs. :-?
Thanks in advance for your replays