0

I have the following config setup:

   server {
        listen              8000;
        server_name         localhost;
        access_log          logs/access.log combined buffer=32M flush=15m;
        root                html/src;
        index               index.html index.htm;

        location / {

            access_log      off;
        }

        location ~ /(files|list|img)/ {
            alias           file_server$uri;
            autoindex       on;
            autoindex_format html;
        }
    }

It work just fine as long as I don't have any åäöÅÄÖ in the local file path... If I try to browse to a folder or file with any of those characters the server will respond with a 500 error. The error log states: 1113: No mapping for the Unicode character exists in the target multi-byte code page.

So my question is, how do I configure the server to understand unicode characters?

EDIT: it seems like the autoindex is at fault here...

6
  • I don't have direct experience with this, so leaving as a comment that nginx usually includes the ngx_http_charset_module which I think has what you are looking for, unless this is an OS level issue.
    – Paul
    Apr 29 at 16:04
  • 1
    It seems like the fault is the autoindex which is listing files with not utf-8 it seems. Removing that and I can fetch filenames and url's with escaped characters. Apr 29 at 16:34
  • 1
    Might be worth reporting to the nginx project.
    – Paul
    Apr 29 at 16:38
  • 1
  • Ticket closed, referred to the original ticket trac.nginx.org/nginx/ticket/458 opened 7 years ago :) Apr 29 at 18:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.