Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Getting non-ascii chars in URLs passed correctly.  Getting 404s due to "ascii-ifying" URLs

Posted on 2007-11-23
Medium Priority
Last Modified: 2012-08-13
I have some files on my web server with non-ascii (in fact, non-Latin) chars in their filenames.
For example:

That is, letter r, then letter o with double acute accent, letter L, and the extension.  The double acute accent is detailed here:

It looks like this site is also unablwe to show the character correctly.  Tsk tsk.

When I make a request for the page, I always get a 404.  Looking in the logd I see that the server is seeking rol.txt, and of course not finding it.
THis is true using

In the IIS logs I see:
21:45:38 GET /rol.txt - 404 3535 819 40  ...

My Web.sitemap contains the correct URL with the accented character.

It appears that the browser is making the correct request, but that the server is not seeing the right chars, URL-encoded or not.
Please advise how to make this work.
Question by:dc197
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
LVL 19

Expert Comment

ID: 20342017
URLs should be encoded before passing.  At the moment, not all systems support internationalised URL encoding as described here

Your best bet is to sanitise filenames before they are stored on your server.

Otherwise, you may find that the international encoding described above will help.
LVL 19

Expert Comment

ID: 20342019
Note that many URL encoding schemes encode URLs according to the non-internationalised standard, i.e. they only support 7-bit ASCII, or if you are lucky 8-bit.  Neither of these support Unicode directly.

Author Comment

ID: 20342954
I developed the site using VS2005 and its internal webserver.  This fully supports unicode chars, and the site works just fine, whether one uses URL-encoded requests or not.

I copied the source over to my dev machine for testing, which is running IIS5 as the webserver.  This is where the problem arose.   Is IIS5 the culprit?  Is IIS6 better?
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 19

Accepted Solution

SteveH_UK earned 800 total points
ID: 20343101

Yes, new in IIS 6

The paragraph at the bottom of the above page reads:

Because IIS 6.0 now supports UTF-8 URLs, you can now log those URL requests to an ASCII log file. UTF-8 is a double-byte character set standard. Because ASCII is a single-byte character set standard, logging UTF-8 information to an ASCII file presents a problem. In such a case, ? is logged for the characters that cannot be converted to the codepage of the server.

Author Comment

ID: 20343697
OK it looks like IIS6 has support for unicode URLs ( as well as better logging. That's good, because the site I wish to host heavily features the Hungarian language, in which o is not the same as ó, ö or ő.


Author Comment

ID: 20343712
It would appear that this site's ability to handle non-standard chars sucks, too.
LVL 19

Expert Comment

ID: 20345079
Actually, they have recently opened an Experts Exchange bug on this issue, and I have been assisting!

It's a fairly standard issue.  For example the PHP language doesn't support Unicode particularly well, and it certainly can make coding harder.

Nevertheless, in my view that is no excuse and I always make sure any forms I code support Unicode fully and do not assume Latin character sets unless appropriate!
LVL 19

Expert Comment

ID: 20345080
So, if you are coding for Hungarian, I recommend that you encode your pages in UTF-8, that you use HTML entities for posting/returning form values, that you always set the HTTP headers (not just those in the HTML page!) and that you TEST, TEST, TEST!

Good luck :)

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have developed many web applications with asp & and to add and use a dropdownlist was always a very simple task, but with the new, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question