ArnoldS ArnoldS - 4 days ago 5
C# Question

Decode encoded Russian characters from url to actual characters in BHO

While navigating to a non-ascii url: "http://ru.wikipedia.org/wiki/Елизавета_I" inside IE, the url received at OnBeforeNavigate2 inside BHO is encoded to

https://ru.wikipedia.org/wiki/%D0%95%D0%BB%D0%B8%D0%B7%D0%B0%D0%B2%D0%B5%D1%82%D0%B0_I

What is this encoding type ?
How can i convert this url back to original non-ascii url in c# or c++?

Answer

Certainly this is not possible inside BHO,

So, I changed my approach to do this inside managed code using URI class.

Uri.UnescapeDataString(https://ru.wikipedia.org/wiki/%D0%95%D0%BB%D0%B8%D0%B7%D0%B0%D0%B2%D0%B5%D1%82%D0%B0_I)

Which returns "http://ru.wikipedia.org/wiki/Елизавета_I".

Comments