RoyFripple
New member
In the program I'm working on, I need to transform an XML file using an XSLT and then write it to a file. I've got the transformation part down fine, but my problem lies in the creation of the file.
I'm using this to create my file:
Dim sw As StreamWriter = File.CreateText(strLocalFile)
Now this works fine, I can even write the string created from the transform to the file. The problem is that it's encoding it as UTF-16 and I need it to be in the UTF-8 encoding.
My question is whether there is anyway to get it to create the file with UTF-8 encoding instead of 16.
Thanks!
I'm using this to create my file:
Dim sw As StreamWriter = File.CreateText(strLocalFile)
Now this works fine, I can even write the string created from the transform to the file. The problem is that it's encoding it as UTF-16 and I need it to be in the UTF-8 encoding.
My question is whether there is anyway to get it to create the file with UTF-8 encoding instead of 16.
Thanks!
Last edited: