How to link to an image with a Kanji filename?
August 24, 2005 12:08 PM
Subscribe
I18n and HTML: How do display images that have kanji filenames, in both IE (PC) and Safari (Mac).
So there I was minding my own business writing code that lets users export HTML reports, very image-heavy reports, that link to these images like so:
<img src="foo001.html"/><img src="foo002.html"/><img src="foo003.html"/> ...
Where the user decides the value of 'foo'. But then to my shock and disgust I find that Safari and IE can't seem to agree about what to do if "foo.html" is
フ.html?
The W3C comment about non-ASCII characters in URIs is a bit discouraging. Safari seems to obey the recommendation without having the common courtesy to do the expected natural thing, while IE doesn't have any truck with the workaround.
I'll resort to JavaScript if I have to, but I was wondering if anyone knows of the happy medium, a format acceptable to both IE and Safari.
posted by fleacircus to computers & internet (3 comments total)
Details: My HTML page declares its encoding as UTF-8. My href attribute is "%e3%83%95.html" (the urlencoding of the UTF-8 bytes of "&30D5;.html"). I'm using an HTML 4 doctype so my page is rendered in standards mode.
Here's a live example that you can test in Safari and IE: フ.html
posted by mbrubeck at 2:18 PM on August 24, 2005