ASP codepage page Coding using Instructions _asp Foundation

Source: Internet
Author: User

The specified code page attribute is not valid.
CodePage property: Is the code page that indicates the page

If you make a Web page script that is different from the default code page on the Web service side, you must indicate the code page:

Copy Code code as follows:

codepage=936 Simplified Chinese GBK
codepage=950 Traditional Chinese BIG5
codepage=437 American/Canadian English
codepage=932 Japanese
codepage=949 Han Wen
codepage=866 Russian
codepage=65001 Unicode UFT-8


Use of page encoding:
Based on VBScript
VBScript
<% @LANGUAGE = "VBSCRIPT" codepage= "65001"%>
Javascript
<% @LANGUAGE = "JAVASCRIPT" codepage= "65001"%>

Here are some additional notes:

Role

Let the ASP read form submissions, databases, etc. in a specific encoding.

How to use

Join in the first line of the ASP file. Based on the different code pages, use the following code:

<%@ codepage=936%> Simplified Chinese
<%@ codepage=950%> Traditional Chinese
<%@ codepage=65001%> UTF-8

Use attention

If page A does not set codepage, the page B and C set the codepage. When you first visit page A, use the IIS default codepage, and then visit page B with the codepage specified by page B, and then when you visit page A, you still use the codepage specified by page B, and the last visit to page C, using the codepage specified by page C.

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.