Hi all,
In vb.net when we save unicode files by default it is saved in UTF-8 , can any one tell me how to save the files in UTF-16 encoding format...
Regards
Gopikris.
Printable View
Hi all,
In vb.net when we save unicode files by default it is saved in UTF-8 , can any one tell me how to save the files in UTF-16 encoding format...
Regards
Gopikris.
I think you can use the StreamWriter :
gopala_kris Please do not post the same question over and over again. All questions in this forum deserves a fair chance to get answers, people will answer your question in due time.Code:Dim sw As New IO.StreamWriter("c:\hannes.txt", True)
MessageBox.Show(sw.Encoding.ToString())
sw.Close()
I have removed all the double posted threads.
Code:Dim sw As New IO.StreamWriter("c:\hannes.txt", True, System.Text.Encoding.UTF32)
sw.WriteLine("Hello")
sw.Close()
this gives the default encoding used by the streamwriter to write into a file, not the encoding used by the file.Quote:
Originally Posted by hannes
Thank u all