I was wondering what encoding format i should be using to send special characters in emails to people using outlook. I have done my own research and came accross ways to do things but none worked for me. I checked outlook and it seems that by default, it is using Western European (Windows) format and is therefore using Windows-1252 Encoding (if what i searched and understood is correct). However, when i tried to convert from unicode in C# to the Windows-1252 encoding, my outlook is still not recognising the special characters to be legitimate. E.g below some random person’s name:
expected result: Mr Moné Rêve
actual result (wrong): Mr Moné Rêve
Can anyone help me on what approach i should take to make the above correct.
My code:
string Fullname = "Mr Moné Rêve";
Encoding unicode = new UnicodeEncoding();
Encoding win1252 = Encoding.GetEncoding(1252);
byte[] input = unicode.GetBytes(Fullname);
byte[] output = Encoding.Convert(unicode, win1252, input);
string result = win1252.GetString(output);
In the end, i went for checking for special characters in my string and changing special characters into their code equivalent e.g é becomes
é