I don't believe that this an accident, as web technologies were very much designed for interchange, and text (for some definition of text) forms a sort of lowest common denominator. Note here that in both cases, the web forms a common backdrop behind the technology usage. However, it is much harder to read it and make sense of it. Here the goal is not only to tunnel binary data over text, but to do it in such a way that the transfer is fairly efficient. Or consider Uuencoding or MIME's usage of Base64.
On the other hand, reading the encoding looks something like a hex dump and is not impossible to decode by hand.
In this way, "Percent Encoding" acts simply as a very inefficient tunnel for binary data - harmless because it is text, unless the other end is specifically looking for binary data. Transmitting raw binary data (and even some things like spaces) is not allowed as part of a URL, but from time to time it would be nice to have a way to tell a computer on the other end about some "out of band" binary information. You've likely seen this one in URLs, with all sorts of things like "%20" showing up (that represents a space). These are pulled from your Wikipedia link.įor example, let's start with the "Percent Encoding". I think taking a look at some of the examples of binary-to-text encoding may help clear this up.