【蛇】乙巳年己卯月戊子日 / 二月廿二日
Thursday March 20, 2025

ASP

ASP is the abbrivation of Active Server Pages

In ASP one can define codepages for the session. These codepages are the same as the windows codepages. For Simplified Chinese (GBK) this is 936 and for Traditional Chinese (Big5) this is 950.
< % session.codepage = 950 % >

The character set can be set using the charset tag
< % Response.Charset = "utf-8" % >

When writing out characters use the chrw-function ("ChrW is provided for 32-bit platforms that use Unicode characters. Its argument is a Unicode (wide) character code, thereby avoiding the conversion from ANSI to Unicode.")
chrw(&H4F60) (prints out the character 你)

To request the language of the browser :
Dim stLang
stLang = Request.ServerVariables("HTTP_ACCEPT_LANGUAGE")


If you connect to a MySQL database you might want to add the SET NAMES in your connection to ensure the connection encoding is properly set up.

[ < back ] - [ home ]