# Charset\_map don't support cp936?

**URL:** <https://www.ruby-forum.com/t/charset-map-dont-support-cp936/201371>\
**Category:** NGINX\
**Created:** [January 6, 2011, 5:40am UTC](https://www.ruby-forum.com/t/charset-map-dont-support-cp936/201371 "2011-01-06T05:40:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [January 6, 2011, 5:40am UTC](https://www.ruby-forum.com/t/charset-map-dont-support-cp936/201371/1 "2011-01-06T05:40:09Z")

</div>

My Nginx/Windows 0.8 running win2003 chinese edition.

My files named used chinese. like  
[http://localhost/中文目录/中文文件.rar](http://localhost/%E4%B8%AD%E6%96%87%E7%9B%AE%E5%BD%95/%E4%B8%AD%E6%96%87%E6%96%87%E4%BB%B6.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…

my mapping file,like.

```
charset_map gb2312 utf-8 {
8140 4E02 ; #CJK UNIFIED IDEOGRAPH
8141 4E04 ; #CJK UNIFIED IDEOGRAPH
8142 4E05 ; #CJK UNIFIED IDEOGRAPH
8143 4E06 ; #CJK UNIFIED IDEOGRAPH
8144 4E0F ; #CJK UNIFIED IDEOGRAPH
8145 4E12 ; #CJK UNIFIED IDEOGRAPH
8146 4E17 ; #CJK UNIFIED IDEOGRAPH
8147 4E1F ; #CJK UNIFIED IDEOGRAPH
8148 4E20 ; #CJK UNIFIED IDEOGRAPH
8149 4E21 ; #CJK UNIFIED IDEOGRAPH
814A 4E23 ; #CJK UNIFIED IDEOGRAPH

```

…

}

Please help me,thanks.

Posted at Nginx Forum:

> **[charset\_map don't support cp936?](https://forum.nginx.org/read.php?2,163984,163984#msg-163984)**
>
> 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

---

<div class="post-metadata">

**Author:** ![ruyi7952](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/4bbf92/32.png) [@ruyi7952](https://www.ruby-forum.com/u/ruyi7952)\
**Post date:** [January 6, 2011, 6:57am UTC](https://www.ruby-forum.com/t/charset-map-dont-support-cp936/201371/2 "2011-01-06T06:57:18Z")

</div>

urlencode by gb2312 don’t working

[http://localhost/������/��������Ӱwww.bluemov.com��������.2010.�й�̨��.��01��.DVD-HALFCD2.mp4](http://localhost/%d6%d3%ce%de%d1%de/%a1%be%c0%b6%b9%e2%f7%c8%d3%b0www.bluemov.com%a1%bf%d6%d3%ce%de%d1%de.2010.%d6%d0%b9%fa%cc%a8%cd%e5.%b5%da01%bc%af.DVD-HALFCD2.mp4)

urlencodr by utf-8 working

[http://localhost/钟无艳/【蓝光魅影www.bluemov.com】钟无艳.2010.中国台湾.第01集.DVD-HALFCD2.mp4](http://localhost/%E9%92%9F%E6%97%A0%E8%89%B3/%E3%80%90%E8%93%9D%E5%85%89%E9%AD%85%E5%BD%B1www.bluemov.com%E3%80%91%E9%92%9F%E6%97%A0%E8%89%B3.2010.%E4%B8%AD%E5%9B%BD%E5%8F%B0%E6%B9%BE.%E7%AC%AC01%E9%9B%86.DVD-HALFCD2.mp4)

please help me for gb2312 support.

Posted at Nginx Forum:

> **[Re: charset\_map don't support cp936?](https://forum.nginx.org/read.php?2,163984,163997#msg-163997)**
>
> 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

---

<div class="post-metadata">

**Author:** ![ruyi7952](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/4bbf92/32.png) [@ruyi7952](https://www.ruby-forum.com/u/ruyi7952)\
**Post date:** [January 6, 2011, 8:22am UTC](https://www.ruby-forum.com/t/charset-map-dont-support-cp936/201371/3 "2011-01-06T08:22:28Z")

</div>

Hello!

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

> 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 D.

---

<div class="post-metadata">

**Author:** ![ruyi7952](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/4bbf92/32.png) [@ruyi7952](https://www.ruby-forum.com/u/ruyi7952)\
**Post date:** [January 7, 2011, 2:46am UTC](https://www.ruby-forum.com/t/charset-map-dont-support-cp936/201371/4 "2011-01-07T02:46:31Z")

</div>

thanks.

you are super man.

Posted at Nginx Forum:

> **[Re: charset\_map don't support cp936?](https://forum.nginx.org/read.php?2,163984,164250#msg-164250)**
>
> 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
