views:

84

answers:

2

Hello,

Im messing a lot with encoding stuff. I see UTF-8, Unicode, Latin, ISO, RTC, etc... But i dont understand the relation between them.

How could i convert from Unicode to ISO 8859-2?

Thanks in advance.

Regards.

+1  A: 

You can use System.Text.Encoding

Encoding iso88592encoder = Encoding.GetEncoding("iso-8859-2"); // by name
// or
Encoding iso88592encoder = Encoding.GetEncoding(28592); // by Windows code page number
byte[] encodedBytes = iso88592encoder.GetBytes(myString);
Rup
+1  A: 

You can use the Encoding class to convert from on encoding to another.

Oded