views:

123

answers:

4

On a specific webpage, when I hover over a link, I can see the text as "bishop" but when I copy-and-paste the link to TextPad, it shows up as "%62%69%73%68%6F%70". What kind of code is this, and how can I convert it into text? Thanks!

+6  A: 

URL encoding, I think.

You can decode it here: http://meyerweb.com/eric/tools/dencoder/

Most programming languages will have functions to urlencode/decode too.

Paul D. Waite
more details => http://en.wikipedia.org/wiki/URL_encoding
Matthew Whited
It says "bishop", according to Meyer!
Dominic Rodger
+1  A: 

This is URL encoding. It is designed to pass characters like < / or & through a URL using their ASCII values in hex after a %. However, you can also use this for characters that don't need encoding per se. Makes the URL harder to read, which is sometimes desirable.

Teun D
A: 

URL encoding replaces characters outside the ascii set.
More info about URL encoding in the w3schools site.

Zeillinger
A: 

As mentioned by others, this is simply an ASCII representation of the text so that it can be passed around the HTTP object easily. If you've ever noticed typing in a website URL that has a space in it, the browser will usually convert that to %20. That's the hexadecimal value for the "space" character in ASCII.

This used to be a way to trick old spam scrapers. One way spammers get email addresses is to scrape the source code of websites for strings matching the pattern "[email protected]". By encoding just the username portion or the whole string as ASCII characters, the string would be readable by humans, but would require the scraper to convert it to a literal string before it could be used to send emails. Of course, modern-day spamming tools account for these sort of strings.

sohum