I'm working with a vba code that writes some info in a txt file, and then this file is read by an ABB robot. The problem is that the output txt file is UCS-2 LE BOM (this is what I can see opening it on notepad++), or ISO-10646-UCS-2-BOM Win (this is what I see opening it on winmerge) char coded. I assume both UCS are the same codification, but each software calls it in its own way.
The issue comes because it seems to be an incompatibility with the char codification and the software of the robot. I have some txt files that the robot does read and they are UTF-8 (notepad++) or Windows-1252 (winmerge).
Here is the vb code that writes the txt file:
Public Sub txtFile()
Dim fsoWriting As New FileSystemObject
Set txtstream = fsoWriting.CreateTextFile("Path", True, True)
txtstream.Write "%%%"
txtstream.WriteBlankLines 1
txtstream.Write " VERSION:1"
txtstream.WriteBlankLines 1
txtstream.Write " LANGUAGE:ENGLISH"
txtstream.WriteBlankLines 1
txtstream.Write "%%%"
txtstream.Close
End Sub
Does anyone know some way to get the output txt file UTF-8 or Windows-1252 char coded? I thought using an external application or function, opening and saving the txt file as... Or maybe changing some of the region settings of windows...