Forum Moderators: travelin cat

Message Too Old, No Replies

strange characters on the Mac

%3A = : %2F = / etc.

         

Lorel

1:14 am on Oct 13, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I am gathering up a collection of strange characters that often appear on the internet when my Mac cannot translate them. These usually occur in URLs.

%3A = :
%2F = /
%20 = (blank space)
%2B = _ (underline)
%26 = &
%3A = "

I need to know what the following represent:

%80
%9D

I'm wondering if others have anything to add to these?

Dijkgraaf

2:17 am on Oct 13, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think those last two are rather character set dependent being character 128 and 157 in decimal notation.
The first one could be the Euro symbol.

BjarneDM

8:32 am on Oct 13, 2005 (gmt 0)

10+ Year Member



That's simply URL encoding.
It's a way of getting around the problems of the web only being able to handle a subset of the ASCII character set in URLs.

You can get the whole story from these URLs:
[w3.org...]
[cl.cam.ac.uk...]
[unicode.org...]

Lorel

3:22 pm on Oct 13, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Thanks for the info. I read most of it but I didn't see the above characters in any of those charts.

What I'm not clear on is if I should switch my browser over to some other unicode system. Any one know?

whoisgregg

8:48 pm on Oct 13, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



A space " " is an illegal character in a URL, but it's encoded value "%20" is not. What it sounds like is happening is that your Mac browser is automatically url encoding those characters which *must* be encoded to be acceptable as part of a URL. Are you experiencing any problems because of this translation?

Longhaired Genius

9:07 pm on Oct 13, 2005 (gmt 0)

10+ Year Member



%80 is the Euro currency sign: €, €. I'm not sure about %9D. The reference I use: this page [w3schools.com], doesn't show it.

BjarneDM

9:16 pm on Oct 13, 2005 (gmt 0)

10+ Year Member



To be blunt:
then you haven't read and understood anything at all!

1) these kind of characters are !ONLY! ever used in URLs (1st reference)
2) they are just the hexadecimal UTF-8 codes prefixed with a '%' (1st reference)
3) there's no need to switch your mac to anything
4) these kind of characters are !ONLY! ever used in programs connecting the internet and they are (in most cases) !PERFECTLY! capable of handling the conversion all by themselves
5) Mac OS X is using UTF-8 internally

Thus, by inference you can just look you 'strange' characters (without the '%' prefix) up in the tables in reference 3 and you'll have your translation.

If you've got BBEdit installed the way to convert is this:
Search string: %..
Replace string: \&#x\1;
check off 'Use Grep'

Then, use the 'Translate' dialogue to convert from HTML to Text where you check off the 'HTML entities' box.

I've been unable to find a program for Mac OS X that explicitly does the URL encoding to text conversion.

And your two strange characters are: %80 = € ; %9D =

Longhaired Genius

10:01 pm on Oct 13, 2005 (gmt 0)

10+ Year Member



Turns out %9D is a control character - Operating System Command.

Lorel

1:58 am on Oct 14, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month




Thus, by inference you can just look you 'strange' characters (without the '%' prefix) up in the tables in reference 3 and you'll have your translation.

Thanks for this. It explais why I couldn't find them on any list I read on the above pages.

I sometimes find these odd characters in search results in Google when searching for website Hijackers. I can't tell if it's a 302 redirect unless I can translate the characters back to what they should be.

whoisgregg

10:01 pm on Oct 14, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I can't tell if it's a 302 redirect unless I can translate the characters back to what they should be.

The content of the URL is insufficient to tell what kind of redirect it is. (Unless the "hijackers" have been so kind as to call their script "302_redirect.php" Even then, why trust them?)

You can use Firefox [mozilla.org] with a live header plugin [livehttpheaders.mozdev.org], then just click on the suspect link in Google. You will be able to see any redirects and what type of redirect is being used.

Lorel

2:03 pm on Oct 17, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



wow! Thanks. whoisgreg!

I didn't realize Firefox could do that.

whoisgregg

6:05 pm on Oct 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You're welcome. :)