T
Thomas A
Hi,
I write a string value to a textfile , if the string dont contains swedish
Å,Ä and Ö , the file will be written in ANSI.
So far so god but....
If the string contains Å or Ä or Ö ,the file will be written in UTF-8.
Thats not good, have anyone a tips for me so it always will be written in
ANSI.
My code is now:
'The Outstring contains my string to write into my file
Dim OutPath as string = "c:\test.txt"
Dim mySW As StreamWriter
mySW = File.CreateText(OutPath)
' Debug.Write(mySW.Encoding)
mySW.Write(Outstring)
mySW.Close()
mySW.Flush()
//Thomas
I write a string value to a textfile , if the string dont contains swedish
Å,Ä and Ö , the file will be written in ANSI.
So far so god but....
If the string contains Å or Ä or Ö ,the file will be written in UTF-8.
Thats not good, have anyone a tips for me so it always will be written in
ANSI.
My code is now:
'The Outstring contains my string to write into my file
Dim OutPath as string = "c:\test.txt"
Dim mySW As StreamWriter
mySW = File.CreateText(OutPath)
' Debug.Write(mySW.Encoding)
mySW.Write(Outstring)
mySW.Close()
mySW.Flush()
//Thomas