473,563 Members | 2,363 Online
Bytes | Software Development & Data Engineering Community
+ 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 11764
Put session.codepag e=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.files ystem 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*****@hot mail.com> wrote in message
news:uD******** *****@TK2MSFTNG P11.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=650 01%> 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.no spam.com> wrote in message
news:ua******** *****@tk2msftng p13.phx.gbl...
You must of course have a unicode font on the client. Add
<%@codepage=650 01%> 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
4746
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: <%@ page pageEncoding="UTF-8" %> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
6
22225
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 header, I found "zh" is not standard. I found this line in apache2's default httpd.conf # Simplified Chinese (zh-CN) AddLanguage zh-CN .zh-cn
8
3473
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 solve it ?? Private Sub Init() With AMSXML ..Formatting = Formatting.Indented ..Indentation = 4 ..IndentChar = " " ..WriteStartDocument()
8
11941
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 part of a datagrid. When an input textbox is displayed it does not display chinese characters, but rather the unicode characters stored in the mssql...
4
6887
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 the data in a node. The CString was then display in CListCtrl. For the traditional chinese characters, they were shown correctly, but for simplified...
0
3697
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 table where i want to import the data using "load data local infile" has collation utf8_unicode_ci. but after the import is done, the chinese...
5
8508
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 I can type characters into this box no problem. They display correctly. I can also copy and paste Chinese characters from web sites into this text...
2
6283
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 to be able to detect which characters are latin based and which are chinese ideographs. eg) a user may enter "hello ÐÂÎÅÍø world" this is...
2
6691
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 of Chinese characters, on my machine I installed language pack and currently set language as Chinese PRC but still it's not working. Option...
1
7630
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7941
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6235
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5479
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5201
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3628
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3612
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2077
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
909
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.