Hi everybody.
I am having big troubles trying to localize a legacy CGI executable for Simplified Chinese language (it has already been localized for some western language). I've reached the goal with IIS 5.1 but not with IIS 7.5.
I'll try to keep it simple: I have built a small CGI executable. I've internationalized it and then provided two translations.
Finally I have deployed the cgi executable and the "locale" directory in which translated resources are, to both the web servers (5.1 and 7.5).
Important:
1. the CGI executable works with DBCS strings, Unicode is not an option now;
2. for the above reason, even on IIS 5.1 web server, I had to tweak regional options and set the "default code page for non-Unicode programs" to Chinese (PRC). This is something I can accept at this point.
3. IIS 5.1 Web Server is a Windows XP Professional, with Chinese language installed and regional settings configured as described above;
4. IIS 7.5 Web Server is a Windows Server 2008 R2, with Chinese language installed and regional settings configured as described above.
Calling the CGI via browser, telnet, or looking at a HTTP/SOAP debugger (Fiddler) output produces these two different results:
=====
IIS 5.1:
=====
HTTP/1.1 200 OK
Server: Microsoft-IIS/5.1
Date: Thu, 11 Oct 2012 13:58:23 GMT
X-Powered-By: ASP.NET
Connection: close
Content-Type: text/html
Content-Length: 478
Content:
<HTML>
<HEAD>
</STYLE>
<TITLE>Test CHS</TITLE>
<BODY>
<a href="../test.html">*Static HTML file saved as Unicode</a>
<br>
*Test resource string: ��
<hr>
<font color="red">*</font>�ǰ�
</BODY>
</HTML>
Which renders properly in IE, given the client character encoding is set to GB2312.
=====
IIS 7.5:
===== HTTP/1.1 200 OK
Content-Length: 475
Content-Type: text/html
Server: Microsoft-IIS/7.5
Content:
Date: Thu, 11 Oct 2012 14:18:47 GMT
<HTML>
<HEAD>
</STYLE>
<TITLE>Test CHS</TITLE>
<BODY>
<a href="../test.html">*Static HTML file saved as Unicode</a>
<br>
*Test resource string: ?
<hr>
<font color="red">*</font>??
</BODY>
</HTML>
Which DOES NOT render properly in IE (those "?" are Hex 3F values).
Furtherly a static HTML page with Chinese symbols would render properly also when served from IIS 7.5
Please help, I am stuck with this.
Thanks in advance,
baba.