I have a process that writes out a html file in various languages.  I need
this file to be in UTF8 format, but it is not cooperating.  I read in
translated text from a UTF8 xml file and combine it with html and formatting
in code.  I use the following to write out the file.

UTF8File = New FileStream(FileName, FileMode.Create)
Bytes = New Text.UTF8Encoding().GetBytes(TempHTML)
UTF8File.Write(Bytes, 0, Bytes.Length)
UTF8File.Flush()
UTF8File.Close()

I have also tried using a StreamWriter and setting the encoding to UTF8 in
the constructor and was left with the same results.

If I open it in VS05, mark it as utf8, and save it the encoding is
corrected.

Any ideas?

Thanks,

Jon Heizer

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to