Reputation: 2578
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.
Upvotes: 2
Views: 1896
Reputation: 498972
You can use the Encoding
class to convert from on encoding to another.
Upvotes: 1
Reputation: 34408
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);
Upvotes: 1