G
Guest
I am creating a text file with a StreamWriter set to UTF8 encoding like in
the following example:
Using writer As New IO.StreamWriter("C:\temp\HelloWorld.txt", False,
System.Text.Encoding.UTF8)
writer.Write("Hello World")
End Using
It appears that ASCII characters are written using two bytes. From what I
have read UTF-8 is a variable length character encoding format and standard
ASCII characters are written using only one byte.
Why is it writing two bytes? Is there a way to change this behavior?
Thanks,
Joe
the following example:
Using writer As New IO.StreamWriter("C:\temp\HelloWorld.txt", False,
System.Text.Encoding.UTF8)
writer.Write("Hello World")
End Using
It appears that ASCII characters are written using two bytes. From what I
have read UTF-8 is a variable length character encoding format and standard
ASCII characters are written using only one byte.
Why is it writing two bytes? Is there a way to change this behavior?
Thanks,
Joe