UTF8

  • Thread starter Thread starter Amman
  • Start date Start date
A

Amman

Hi all,

I am working on a client that receives data from a server in UTF8 format. How do I convert that to display correctly in a RichTextBox?

For example, I might receive ü which should display as: ü

Thanks
 
Amman said:
I am working on a client that receives data from a server in UTF8 format.
How do I convert that to display correctly in a RichTextBox?

For example, I might receive ü which should display as: ü

You don't receive those two characters - you receive two *bytes*. Use
Encoding.UTF8 to convert a sequence of bytes into a sequence of
characters.

See http://www.pobox.com/~skeet/csharp/unicode.html for more
information.
 
Back
Top