Accept dead keys (accents etc.) in Apache

Posted on 2005-04-25
Last Modified: 2011-09-20
I have apache installed on a linux box (Apache 1.3 / RH Enterprise Linux ES 2.1) and here in Luxemburg we use many diffrent languages so a lot of customers are uploading their files with special characters as é è ü etc.

When there is such a character in a filename, I can't open the file via apache (they a readable on the server, but I get a 404 from Apache).

Is there a correct solution for this or a workaround?

thank you
Question by:SiraX
    LVL 51

    Accepted Solution

    depends how the files are uploaded
    i.g. the special characters are preserved in the filename on the filesystem, so that's not the problem

    But if you try to use such a name in an URL of your browser, the browser URL-encodes anything which is not 7-bit US-ASCII, for example ü becomes %c3%bc  for details see RFC 2396 and RFC 1738

    Conclusion: never-ever use such characters in filenames to be reached via URL, or teach you users how to write these filenames URL-encoded (hard job to do this for roughly 6*10^12 humans;-)

    technical you may use mod_rewrite to filter and convert such characters on the fly, but  keep in mind that there are:
     1. serveral encodings in the wild (%-encoding, UTF-8, ...)
     2. europe has a lot of characters, just think on the danish, spanish, etc.
    then you have to do the rewrite rules for all combinations of 1. and 2. ... better you go with plain odd 7-bit ASCII in your filenames :-/

    Author Comment

    thank you for your quick answer

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
    If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    734 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

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now