ONE Active Server Pages Product Home Page Developer Site Version


Understanding Code Pages

When you are building an ASP application that must support non-US-English users, the application must support character set conversions. Internally, ASP and the language engine it calls speak in Unicode strings. However, Web page content can be in ANSI, DBCS, or another character-encoding scheme. Therefore, when an HTTP request from a browser includes either form or query string values, they must be converted from the character set used by the browser into Unicode for processing by an ASP script. These conversions map characters from one code page, which is a set of characters organized in some scheme, such as ANSI, to another. For example, the value that refers to the letter "a" in ANSI is converted to the different value that refers to that same letter "a" in Unicode. Similarly, when output is sent back to the browser, any strings returned by scripts must be converted from Unicode back to the code page used by the client.

These internal conversions are done using the default code page of the Web server. This works great if the users and the server are all speaking the same language (more precisely, if they use the same code page). However, for example, if you have a Japanese client hitting an English server, the code page translations do not work because ASP treats Japanese characters as if they are English.

See also:

Developing International Applications