Convert UTF8 string to UTF-16 in .net?

If you have a file and you know that encoding of the file is UTF8 you can use StreamReader to read the file as if it is encoded in UTF8 Regarding conversion from UTF8 to Unicode, you are comparing 2 different things. Check the link in my comment to your question System.Text. UTF8Encoding is UTF8 System.Text.

UnicodeEncoding is UTF16. Check this link for conversion. You would be using Encoding.Convert().

If you have a file and you know that encoding of the file is UTF8 you can use StreamReader to read the file as if it is encoded in UTF8. Regarding conversion from UTF8 to Unicode, you are comparing 2 different things. Check the link in my comment to your question.System.Text.

UTF8Encoding is UTF8 System.Text. UnicodeEncoding is UTF16. Check this link for conversion.

You would be using Encoding.Convert().

Use System.Text.Encoding. UTF8.GetString(). Pass in your UTF-8 encoded text, as a byte array.

The function returns a standard . Net string which is encoded in UTF-16.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions