I'm working on a multilanguage ASP/HTML site using a IIS6 web server.
It perfectly works with two languages (english and italian) in this way:
- basically the same ASP code for every language
- language-specific content is stored in text files, every language has it's
own directory contents.
- to enhance usability and formatting the language-specific contents are
stored with html syntax; basically the code that normally stands between the
<bodyand </bodystatements.
- the ASP code loads those (html) files and it arranges them with
dinamically generated html code, then it outputs everything to the browser.
No problems here. It works
So I've decided to give it a try with chinese and to accomplish the task I
did:
- Inserted the following code in the .asp pages
<%@ CodePage=65001 Language="VBScript"%>
<%
Response.CodePage = 65001
Response.CharSet = "utf-8"
%>
- Changed the HTML header of output pages:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- Saved the asp pages containing chinese characters in UTF-8 encoding
Till here everything works properly and the browser (IE7) shows chinese
characters correctly.
Now the problem.
As I've said before ASP code loads some html code from text files on disk
and formats them. Those html templates have the chinese-counterpart text
inside and are stored in UTF-8, nevertheless when showed into the browser
the characters are scrambled up in something else. The chinese characters
generated by ASP are shown correctly, but the contents in the text files are
not!
Could it be that when the ASP code loads the text file from disk, the
contents gets screwed up
or
the web server tries to 'translate' the allready UTF-8 encoded text?