All Forums >> [Scripting] >> WSH & Client Side VBScript >> Convert ANSI txt file to UTF-8 txt file Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
I'm working on the following script to convert ANSI to UTF-8, at present the below works for ASCII to unicode, any ideas how to alter this for ANSI to UTF-8
thanks
' working for ASCII to Unicode Const ForReading = 1 Const TriStateTrue = -1 Const ForWriting = 2
Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFile = objFSO.OpenTextFile("c:\cmc\VBscript\test33.txt", ForReading,False,TriStateTrue) strText = objFile.ReadAll Set objFile = objFSO.OpenTextFile("c:\cmc\VBscript\test45.txt", ForWriting,False,TriStateTrue) objFile.WriteLine strText