Last post Mar 13, 2007 01:23 PM by himawari
Mar 11, 2007 07:34 AM|combilli|LINK
I'm now making a Chinese Site , using web matrix.
I think default it's using unicode .. When I put the page in IIS, and browse it in IE , I click to the View -> Encode , it shows unicode. Everything seems ok.
But I was told to make the page in GB code to show Chinese. Then I use dreamweaver and find a page properties function, I set the page encoding to GB, then dreamweaver put an html code
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"> for me...
I save it, then I put it in IIS , browse it, I click on view -> encoding , it still showing "Unicode". And I view the source , there is the html tag "<meta http-equiv="Content-Type" content="text/html; charset=gb2312">"
If I change the encoding to GB , then all the chinese turn in to symbol....
Could someone tell me why's this and how to solve this issue..?
This drive me crazy
Mar 11, 2007 08:01 AM|Ramzi.Aynati|LINK
try this in ur code behind on ur page load
Inform me if this helps
Mar 11, 2007 09:47 AM|combilli|LINK
Yea... use Response.Charset = "gb2312"
I didn't try to put it in form_load yet... I found a solution to use vbscript
<html> <head></head> <srcipt> Response.Charset("GB2312") </srcipt> <body> ................ </html>
And it works , page is encoded by GB..
but now I got another problem..
the Chinese orignal was in unicode , and now the Chinies are displayed in symbol....
I think I have to find a way to convert the Chinses words in aspx file to GB........
I'm not sure how just keep asking and searching from the internet
Mar 11, 2007 10:37 AM|combilli|LINK
After the page is shown in gb encoding , but all Chinines that previously shown in normal turns into symbol...
Now I find another solution...
Modify the very beginning tag in aspx file
<%@ Page Language="VB" %> change to
then IE will show the page encoded by GB , and all Chiniese shown in normal...
I don't know why.. but this works...
I wish if someone know why and can explain it..
Mar 13, 2007 01:23 PM|himawari|LINK
Your strings are stored in Unicode. By setting the ResponseEncoding to GB2312 ASP.NET will convert the output as GB2312 encoded pages. To allow a browser to auto detect your page as GB2312, you may need to add the following meta tag to your html header:
<meta http-equiv="Content-Type" content="text/html; charset=GB2312" />.