i have this code when i run it, it give me “?” instead of “€” (euro sign).
Can anyone tell me what i can do to fix it.
string Message = "Hello $ € £";
Encoding iso = Encoding.GetEncoding("ISO-8859-1");
Encoding utf8 = Encoding.UTF8;
byte[] utfBytes = utf8.GetBytes(Message);
byte[] isoBytes = Encoding.Convert(utf8, iso, utfBytes);
string msg = iso.GetString(isoBytes);
Console.WriteLine(msg);
I just confirmed this works, but you also need to use the right font for your console (for example I tried “Lucida Console” which is OK. also, you also need to make sure your source code (.cs file or whatever) is in utf8 encoding.