I am trying to insert a pound symbol into a plain text email using .net but it appears as £
Any ideas how I can fix this?
thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The only way to get it working is to make sure you encode the email with the same character encoding as to what you decode it with. In this case, you are encoding the email in UTF-8 but decoding it as if it was Latin-1. It might be overkill for this case, but The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets is a good read.
One solution is to add
Content-Type: text/plain; charset=UTF-8as a header.