471,832 Members | 1,447 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,832 software developers and data experts.

handle chinese characters?

js
Hi, hwo to use ASP to handle chinese characters output?
I have try two ways:
1. store the string in a text file(unicode file)
2. store the string in an access database

The first method got an error:
Active Server Pages error 'ASP 0239'
Cannot process file
UNICODE ASP files are not supported.

The second method output "???" on the browser.

How to handle it, pls help.

Thanks....
Jul 19 '05 #1
5 11583
Put session.codepage=65001 at the beginning of your page to tell ASP to send
data to the browser in UTF-8 format.

That should make the Access approach work.

To use a text file. Put the data in a unicode .txt file and read it in with
the scripting.filesystem object (there is a parameter specifying a unicode
file). Then output the information as desired.

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"js" <js@so*****@hotmail.com> wrote in message
news:uD*************@TK2MSFTNGP11.phx.gbl...
Hi, hwo to use ASP to handle chinese characters output?
I have try two ways:
1. store the string in a text file(unicode file)
2. store the string in an access database

The first method got an error:
Active Server Pages error 'ASP 0239'
Cannot process file
UNICODE ASP files are not supported.

The second method output "???" on the browser.

How to handle it, pls help.

Thanks....

Jul 19 '05 #2
js
Thanks Marks!

It help me out.
Jul 19 '05 #3
You must of course have a unicode font on the client. Add
<%@codepage=65001%> in top of your asp files (don't save your asp files in
Unicode text). Add a <meta> tag or add a custom HTTP header on your virtual
direcotry with customer Header Name "Content-Type" and value "text/html;
Charset=utf-8" (without quotes). You can later on remove this header for
individual files (or you can just add custom headers on the files you want).
This will enforce the encoding (which you in IE can see by right
click->Encoding) in the page to be utf-8. If the encoding is not correct and
you post back data to the server it will be "rubbish".

In your access database open a table and select a unicode font in
Format->Font menu to see unicode characters in Access. It could otherwise be
problematic to see what is actually stored in database.

Regards
/Hans
Jul 19 '05 #4
Sorry if this mesage is sent twice (it was immeidately removed for some
reason)

You must of course have a unicode font on the client. Add
@codepage=65001 in top of your asp files (don't save your asp files in
Unicode text). Add a <meta> tag or add a custom HTTP header on your virtual
direcotry with customer Header Name "Content-Type" and value "text/html;
Charset=utf-8" (without quotes). You can later on remove this header for
individual files (or you can just add custom headers on the files you want).
This will enforce the encoding (which you in IE can see by right
click->Encoding) in the page to be utf-8. If the encoding is not correct and
you post back data to the server it will be "rubbish".

In your access database open a table and select a unicode font in
Format->Font menu to see unicode characters in Access. It could otherwise be
problematic to see what is actually stored in database
Regards
/Hans
Jul 19 '05 #5
js
Thanks Hans.

"Hans" <ha***@sorry.nospam.com> wrote in message
news:ua*************@tk2msftngp13.phx.gbl...
You must of course have a unicode font on the client. Add
<%@codepage=65001%> in top of your asp files (don't save your asp files in
Unicode text). Add a <meta> tag or add a custom HTTP header on your virtual direcotry with customer Header Name "Content-Type" and value "text/html;
Charset=utf-8" (without quotes). You can later on remove this header for
individual files (or you can just add custom headers on the files you want). This will enforce the encoding (which you in IE can see by right
click->Encoding) in the page to be utf-8. If the encoding is not correct and you post back data to the server it will be "rubbish".

In your access database open a table and select a unicode font in
Format->Font menu to see unicode characters in Access. It could otherwise be problematic to see what is actually stored in database.

Regards
/Hans

Jul 19 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Jeff | last post: by
8 posts views Thread by Agnes | last post: by
8 posts views Thread by pabv | last post: by
reply views Thread by st.frey | last post: by
5 posts views Thread by Figmo | last post: by
2 posts views Thread by Wassy | last post: by
aboka
reply views Thread by aboka | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.