Nginx/windows autoindex module URL charset problem

OS: Windows 7 (non-unicode code page: 936 Simplified Chinese)

URL in autoindex page is encoded in code page 936 (two byts per
character), all file containing Chinese character cannot be accessed in
autoindex listing.

Windows.Server.2003网络专业指南.pdf original filename

Windows.Server.2003%cd%f8%c2%e7%d7%a8%d2%b5%d6%b8%c4%cf.pdf wrong
result in nginx/windows 0.8.54 autoindex URL

correct URL in UTF-8

Posted at Nginx Forum:,181112,181112#msg-181112


I met the same problem with cyrilic code page.
It seems the problem is in utf8 - windows does not run programs with
one-byte locale “utf-8”, while other OSes (freebsd, linux) returns file
names to the program in utf8.

I was able to work around this problem by running nginx via cygwin on
I compiled nginx from source under cygwin and the problem disappers.

Good luck. Sorry for my english.

P.S. my config for now:

http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 808;
server_name localhost;
location “/Усяляка бяка” {
charset utf-8;
root /home/html;
autoindex on;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs