Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What kind of encoding is this?

Tags:

c#

encoding

What kind of encoding do you use to encode http:// as http%253A%252F%252F

HttpUtility.UrlEncode gives http%3a%2f%2f

like image 820
sean Avatar asked Mar 23 '10 16:03

sean


People also ask

What is the encoding type?

Encoding is the process of converting data from one form to another. While "encoding" can be used as a verb, it is often used as a noun, and refers to a specific type of encoded data. There are several types of encoding, including image encoding, audio and video encoding, and character encoding.

What are the 3 types of character encoding?

There are three different Unicode character encodings: UTF-8, UTF-16 and UTF-32.

What type of encoding is UTF-8?

UTF-8 is a Unicode character encoding method. This means that UTF-8 takes the code point for a given Unicode character and translates it into a string of binary. It also does the reverse, reading in binary digits and converting them back to characters.


2 Answers

What you're looking at is text that has been passed through UrlEncode twice.

The second time changes the % symbols to %25.

It's unusual to pass an entire URL through UrlEncode anyway, unless you are passing it as a parameter in another URL (for redirection, for instance).

like image 51
richardtallent Avatar answered Oct 09 '22 01:10

richardtallent


It looks like UrlEncode was called twice, encoding the literal % as %25 (which is the correct result, by the way).

like image 29
Mark Rushakoff Avatar answered Oct 09 '22 01:10

Mark Rushakoff