charset_map don't support cp936?

Maxim Dounin mdounin at
Thu Jan 6 10:21:49 MSK 2011


On Wed, Jan 05, 2011 at 11:39:29PM -0500, ruyi7952 wrote:

> My Nginx/Windows 0.8 running win2003 chinese edition.
> My files named used chinese. like 
> http://localhost/中文目录/中文文件.rar> 
> If use IE and firefox with encode gb2312 you can downloaded chinese
> named files,but  if use utf-8 you can't download any chinese named
> files.
> I think use the charset_map mappings gb2312 code to reencode  to
> utf-8,but  charset_map do not support cp936.
> set charset utf-8 no help....

No, this won't work - nginx doesn't recode urls, you should use 
correctly urlencoded links instead.

Charset module is used to specify charset for response content 
and/or recode it.

> my mapping file,like.
>     charset_map  gb2312  utf-8 {
>     8140  4E02 ; #CJK UNIFIED IDEOGRAPH

And this won't work even for response content - only utf-8 and 
single-byte encodings supported.

Maxim Dounin

More information about the nginx mailing list