I have a Paradox BD that returns me the following string after a query in an industry table that a given worker gets: Maintenance. Actually it should be Electrical Maintenance. I need to return this string to a browser.
From my research, this is a CP850 encoding that I need to convert to UTF-8, which is the encoding that is commonly used. I saw this in the link:
I'm trying to do the following in C #:
Encoding utf8 = Encoding.UTF8;
Encoding cp = Encoding.GetEncoding(850);
byte[] cpBytes = cp.GetBytes(identifColaborador.setor);//aqui já vem como ManutenþÒo ElÚtrica
byte[] utf8Bytes = Encoding.Convert(cp, utf8, cpBytes);
string msg = utf8.GetString(utf8Bytes);
But unfortunately I'm not getting success. It still returns in the string msg Electrical Maintenance
Where can I be wrong?