473,480 Members | 1,712 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 11756
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
4728
by: Jeff | last post by:
Having a problem displaying both german and chinese characters from a UTF-8 database on the same *.jsp page. Can make Chinese characters appear correctly by including the following lines: <%@...
6
22208
by: Zhang Weiwu | last post by:
Hello. I am working with a php software project, in it (www.egroupware.org) Chinese simplified locate is "zh" while Traditional Chinese "tw". I wish to send correct language attribute in http...
8
3454
by: Agnes | last post by:
In my .net ,i need to generate an xml file , however, user may input a chinese character, Then , the xml will got something unknow characters. the following is my code, Does anyone know how to...
8
11927
by: pabv | last post by:
Hello all, I am having a few issues with encoding to chinese characters and perhaps someone might be able to assist. At the moment I am only able to see chinese characters when displayed as...
4
6877
by: K | last post by:
I've an XML file in UTF-8. It contains some chinese characters ( both simplified chinese and traditional chinese). In loading the XML file with MSXML parser, I used the below code to retrieve...
0
3683
by: st.frey | last post by:
I've got a problem with importing chinese characters into a mysql-table and have read several mailings but didn't find a solution. i have a utf-8 text file that contains chinese characters. the...
5
8478
by: Figmo | last post by:
I'm having a problem working with foreign characters (well....foreign to me anyway) I have a textbox control on a form. The font is set to MS Arial Unicode. If I use the Chinese input method...
2
6263
by: Wassy | last post by:
Hi, i have a website which contains both chinese and english content which is stored in a database. Each record in the dB has an english and Chinese field. If a user enters a search string i have...
2
6672
by: Flying Kite | last post by:
Hi All, I want to know how to print chinese characters on Zebra Printer, following code working fine with English string, but it's not working for Chinese string. It shows ASCII characters instead...
0
7039
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6904
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7037
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7080
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6735
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5326
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
2992
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
2977
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
176
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.