Codepage problem

  • Thread starter Thread starter Daatmor
  • Start date Start date
D

Daatmor

I saved my aspx with Encoding (Chinese Tranditional (Big5) - Codepage 950)
and I had set codepage="950" in Page tag. The content rendered incorrect
(all text changed to symbols), but some content those read from xml file
works correct.

How can I fix this problem?
Thanks
 
Do you use a "Web.config" file? Try to set "requestEncoding" and
"responseEncoding" in that file.

Azat
 
Hi Azat,

Thanks for your help, its works.
But my site contains english pages and chinese pages. If set
"requestEncoding" and "responseEncoding" in "Web.config", all page will
encoded with Chinese Tranditional (Big5). English viewers will show
"download IE chinese language pack" dialog box when they browsing english
pages.
I tried set 'ResponseEncoding="Big5"' in each chinese page's @page tag,
but chinese characters cannot works correct. In @page tag, "requestEncoding"
property cannot be specified. Where can I set "requestEncoding" for certain
page? or has any other solutions?
Thanks

Hugo
 
Dear Azat

I found solution:
I can add a new "Web.config" in my chinese pages folder. It just
contains following codes:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.web>
<globalization requestEncoding="Big5" responseEncoding="Big5"
fileEncoding="Big5" />
</system.web>
</configuration>

But if chinese pages and english pages stored in same folder, above
method cannot work.

Regards,
Hugo
 
Daatmor said:
Dear Azat

I found solution:
I can add a new "Web.config" in my chinese pages folder. It just
contains following codes:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.web>
<globalization requestEncoding="Big5" responseEncoding="Big5"
fileEncoding="Big5" />
</system.web>
</configuration>

But if chinese pages and english pages stored in same folder, above
method cannot work.

Why not use a code set that covers both Latin and Chinese characters,
i.e. Unicode? You can use UTF-16 or UTF-8 as request and response
encoding here for example.

Cheers,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top