I have some simple HTML which has a link to another HTML file - but that file name contains a unicode character. Depending upon how I encode the link, IE on Windows will not open it - and yet the very same link works on all the other browsers (Windows and Mac) Any pointers would be most welcome.
What seems to be key here is that I'm opening the HTML on a local disk (i.e. it's not being served up by a web server.)
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>website</title>
</head>
<body>
<a href="%C3%A9.html">Fails on IE - works everywhere else (Firefox, Chrome, Safari)</a>
<p />
<a href="é.html">Works on IE</a>
</html>
Thanks
Craig
This is discussed in the following IEBlog article on MSDN:
File URIs in Windows
In other words, since your HTML is using UTF-8, the URL must use non-percent-encoded UTF-8 octets for the
é
character, which is whyé.html
works and%C3%A9.html
fails - there is no file namedé.html
, for example.This is how Internet Explorer is designed to work. It is not a bug. The other browsers are simply doing something different, that's all. Unless you can configure the webserver to deliver different HTML to IE vs other browsers, you will have to use client-side technology instead, such as conditional comments, eg:
The
X-UA-Compatible
meta tag is needed because Microsoft removed support for HTML conditional comments in IE 10 when it implemented support for HTML5.