Encoding issue asp.net

2020-04-11 19:00发布

问题:

I have a file in notepad, saves ad Ansi encoding with two URLs:

http://www.odinklik.ru/site​.aspx?​site=korney_​chukovsky

http://www.odinklik.ru/site.aspx?site=korney_chukovsky

As you can see from the paste - one of them is looking "weird". It is changed to: "http://www.odinklik.ru/site%E2%80%8B.aspx?%E2%80%8Bsite=korney_%E2%80%8Bchukovsky"

When i copy it in the browser. What is happening here?

回答1:

The code E2 80 8B is the UTF-8 code for the character Zero Width Space, but this is not a character that exists in an ANSI character set.

Either you have some other obscure spacing character that is translated into a Zero Width Space when you copy the text, or the file is actually not saved as ANSI after all.