Pound symbol in text message

I am trying to insert a pound symbol in a text email using .net, but it looks like  £

Any ideas how I can fix this?

thank

+3
source share
5 answers

The only way to make it work is to make sure that you encode the email with the same character encoding as with its decryption. In this case, you encode the email in UTF-8, but decode it as if it were Latin-1. This may be redundant for this case, but the Absolute Minimum Every software developer, absolutely sure, should know about Unicode and character sets , is a good indication.

One solution is to add Content-Type: text/plain; charset=UTF-8as a title.

+2
source

Make sure the declared email character encoding matches the character encoding you are using.

+1
source

, , .

, , - , : -).

, ( Unicode, ASCII, , ), , .

P.S. . :

, Unicode ( !)

+1

, , , , , . " ", HTML.

, "Content-Type: text/plain; charset = UTF-8" . :

"Content-Type: text/plain; charset = 'UTF-8'"

Of course, several other encodings will work just fine.

0
source

Depends on how you insert it, but a few options ...

$ 

or

Convert.ToChar(35);
-3
source

Source: https://habr.com/ru/post/1767328/


All Articles