I am trying to transform a UTF8 string to Latin characters.
Here's a example of how I am trying to achieve this:
string sUnicode ="Peneda-Gerês";
string result = Encoding.Unicode.GetString(Encoding.Convert(Encoding.UTF8, Encoding.Unicode, Encoding.UTF8.GetBytes(sUnicode)));
MessageBox.Show(result);
The string return is the same? No change?
What am i missing?
If I go to this site
http://software.hixie.ch/utilities/cgi/unicode-decoder/utf8-decoder
and put the same text, it gets decode correctly to "Peneda-Gerês";
You are converting from unicode to utf8 to unicode. So the result is the same as the source.
Your source string is in ISO-8859-1
Run this and pick the correct encoder:
Or to be spot on: