Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I looked around and can't find any info on this, I must be searching the wrong terms or something because it must be a common question.

If you have non-ASCII characters in your URLs, Firefox and Chrome show them nicely in the address bar (like en.wikipedia.org/wiki/Cliché), but IE (including IE10 consumer preview) shows a munge of character codes or something, like this en.wikipedia.org/wiki/Clich%C3%A9.

Is one of these approaches more correct than the other? Is it likely that IE will one day start doing what FF and Chrome do?

Basically I'm trying to decide whether on a new site I should transliterate or not. My preference is to not transliterate, because it "seems right" to use the correct characters and it looks better in FF/Chrome. However, it looks horrible in IE, and since the majority of people use IE, that argues for transliteration.

Once you put a policy in place, you're probable never going to change it. So if I know that a future version of IE will start acting like Firefox et al, then I'm happy to lay the foundation with raw URLs and let current users suffer. But if not, I think I'd prefer transliteration. Any recommendation?

share|improve this question
1  
"and since the majority of people use IE" it is not actually true: Chrome overtook IE as most used browser earlier this year. –  milo5b Aug 8 '12 at 14:41
    
@milo5b that's interesting. OK let's settle for "a lot of people". –  Fletch Aug 8 '12 at 15:03
3  
@milo5b those measurements are debatable for various reasons; regardless you should only be looking at your own site's statistics. –  DisgruntledGoat Aug 8 '12 at 21:07
    
+1 It's true, every site has its own sats. It's also true this info are not 100% accurate, but it can give you a rough idea, as few years ago IE had over 50% market share, now it has less than a third. If it is above or below Chrome it's not so important afterall. I just said this as a curiosity fact :) –  milo5b Aug 9 '12 at 9:02
add comment

1 Answer 1

The short answer is "it depends", mostly on what you're going to do with it.

Looking at the spec for RFC3987 Internationalized Resource Identifiers, IE is well within it's rights to encode your URLs, especially if you've got a US/UK keyboard assigned where entering an é might not be the simplest of actions for the user...

On top of that, I've seen servers get very upset when they are expecting one format and the browser sends something slighty different (i.e. " ", "+" or "%20"), see also Handling Character Encoding in a URI in Tomcat for another example.

To be fair to IE9, if I actually type Ctrl+Alt+e+' into the address bar, it does display the character correctly, it's only if I copy/paste it in that it changes:

enter image description here

The wikipedia source actually URL encodes the links with the character and leaves it up to the browser:

<a href="/wiki/Clich%C3%A9_(disambiguation)"

And as w3d point's out in the comments, requesting http://en.wikipedia.org/wiki/Cliché in Chrome actually results in a request being made for http://en.wikipedia.org/wiki/Clich%C3%A91

So my recommendation would be to ensure that your site can handle either preference - because some browsers will send you encoded strings if you use IRI's instead of URIs.


Footnotes:

  1. I can't actually get this editor to honour an IRI, using the é symbol cuts the auto recogniser off at the "h", adding it as a link turns it into the encoded version, and correcting the encoded version removes the link altogether.
share|improve this answer
1  
I think the only difference between Chrome and IE is what actually shows in the address bar to the end user (aesthetics). Behind the scenes (if you open Chrome's Developer Tools) you can see that Chrome has in fact requested the encoded URL "Clich%C3%A9" (with the "munge of character codes"). –  w3d Aug 8 '12 at 19:33
    
@w3d Interesting point, I didn't check that... –  Zhaph - Ben Duguid Aug 9 '12 at 8:37
    
Thanks, yeah the comment from w3d confirms what I thought, that behind the scenes it's all the same. It's not about the server being able to handle it, it's about which URL you choose. So it's simply a matter of aesthetics and perhaps mildly of SEO. I wish IE would just do what the others do and then the decision would be clear. But it doesn't seem to be going that way. –  Fletch Aug 9 '12 at 20:45
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.