How to enable the server to support Chinese file name download settings

Source: Internet
Author: User

This issue has been discussed many times. It is indeed a big bug of ms, which appears on iis of Far East language edition. You have five options, except for the shell:

1. Use another web server, such as apache. [This method is strongly recommended]
2. Do not use Chinese characters as file names. You can use Pinyin instead. [Recommended]
3. Use a mix of Chinese and English file names (it is said that the bug can be avoided, but it is not completely tested and cannot be guaranteed to be correctly accessed in all circumstances) [not recommended]
4. Wait for ms to release the patch. [no hope, I don't know how long it will take, and I haven't seen the patch]
5. Force all users to use a browser that directly sends a url encoded in local Chinese [wait for the user to complain]

In fact, the solution is very simple:
Modify registry
Local machine-> system-> currentControlset-> services-> inetinfo->
Paramters-> favordbcs changed from 1 to 0. Restart iis.

Local machine-> system-> currentControlset-> services-> inetinfo->
Paramters-> favordbcs changed from 1 to 0
My analysis shows that:

For iis of the Far East edition, local win2k adopts local encodings such as gbk, shift-jis, and big5, which are both dual-byte mixed encodings.
The favordbcs name is estimated to be "Double Byte encoding habits ". Ms may make intelligent judgment algorithms for double-byte encoding, or obtain a higher recognition priority.

Unfortunately, ms may have some bugs. It is estimated that some UTF-8 encoding conflicts with the local dubyte encoding, which may discard one byte from some people.

I was going to perform a complete test, but now that I have this workaround, I don't have to worry about it.

The problem is that this method must be workaround, and Microsoft must have known it for a long time. It is not published and cannot be found on the ms website!
================

'Convert two-byte characters into valid URL transmission stringsCopy codeThe Code is as follows: function getUrlEncodel (byVal Url)
Dim I, code
GetUrlEncodel = ""
If trim (Url) = "" then exit function
For I = 1 to len (Url)
Code = Asc (mid (Url, I, 1 ))
If code <0 Then code = code + 65536
If code & gt; 255 Then
GetUrlEncodel = getUrlEncodel & "%" & Left (Hex (Code), 2) & "%" & Right (Hex (Code), 2)
Else
GetUrlEncodel = getUrlEncodel & mid (Url, I, 1)
End if
Next
End function

Test passed.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.