New Yun ASP system to generate UTF-8 coded Web site method

Source: Internet
Author: User
Tags modify string
New cloud Default generated Web page is gb2312 encoded, E-wen of course is utf-8 just good, not just foreign people not to see garbled, there are match googlse adsense suitable than gb2312 good oh (cautious reference, unconfirmed)。 Supposed Just a word.

First of all, to replace all charset=gb2312 batch into Charset=utf-8, template site head tag inside also want to modify, documents all with DW in utf-8 environment to convert once (found enough silly). Error results

It is found that <%@ LANGUAGE = vbscript CodePage = 936%> is changed to <%@ LANGUAGE = vbscript CodePage = 65001%> in conn.asp

Errors disappear. However, when the page is generated, it is found that the uft-8 does not display the interface, but the source code exists, nndx.

After the results of the study: open inc/cls_main.asp to find the Createdtextfile function, change to CreatedTextFile2

Then find createdtextfiles change to Createdtextfile, the inside GB2312 to UTF-8

Get.

Further research in fact, very simple, I detours, you guys if you need to do according to the following methods do not need to replace all the files are utf-8, just want me to generate static HTML is UTF-8 encoding on OK

1, open inc/cls_main.asp find Createdtextfile function, change to CreatedTextFile2

2, and then find createdtextfiles change to Createdtextfile, the inside of the GB2312 to UTF-8

3, modify the template, the site head tag inside the GB2312 change to UTF-8

--------------------------------------------

Method 2 is as follows:

To convert all text files into UTF-8 format, this method of modification is: to open a file, save as, code change UTF-8

Then open conn.asp to modify the first line, CodePage = 936 to CodePage = 65001

Then open inc/cls_main.asp to find the Createdtextfile function, instead CreatedTextFile2

Then find createdtextfiles change to Createdtextfile, the inside GB2312 to UTF-8

Then dozen other files will be inside the GB2312 all changed to UTF-8 (which you have to find, you can find a string replacement function to complete)

Finally modify the template to change the inside GB2312 to UFT-8

If you understand a little bit ASP is very simple, do not understand slowly digest it

The above actions can be done with tools, string replacement tools and file conversion tools (ANSI UTF-8), tools can be found online

Good luck to you, ~~!.



Related Article

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.