Wrox Programmer Forums
|
ASP Forms As of Oct 5, 2005, this forum is now locked. Please use "Classic ASP beginner" at http://p2p.wrox.com/forum.asp?FORUM_ID=54 or "Classic ASP Professional" http://p2p.wrox.com/forum.asp?FORUM_ID=56 instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Forms section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 20th, 2004, 08:07 PM
Registered User
 
Join Date: Jul 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Read and Display Chinese Characters

Hi,

I use asp to develop a web page to read an excel file containing Chinese Character then display it in the web page. Unfortunately, I cant display it!!! it will display (?????????). Thx.-

 
Old July 21st, 2004, 02:19 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Use this within <HEAD></HEAD> tags of you page

Code:
<META HTTP-EQUIV="content-type" CONTENT="text/html; charset=charset_name">
where charset_name can be gb2312 or big5 or utf-8.

Hope that helps.
Cheers!

_________________________
- Vijay G
Strive for Perfection
 
Old July 21st, 2004, 09:16 PM
Registered User
 
Join Date: Jul 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi,

it doesnt work.
here are the codes:

' create and open the connection to the Excel file
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "DRIVER=Microsoft Excel Driver (*.xls);" & "DBQ=" & Server.MapPath("uploadfolder/" & NewFileName)

Set RS = conn.Execute("Select * From [Customer_Group]")

'response.write connection
con.open connection
' Create recordset and retrieve values using the open connection
Set objRS = server.CreateObject("ADODB.Recordset")

%>
<TABLE Border=1 CellPadding=3>
<TR class=TRAlternate1>
<% For f = 0 To RS.Fields.Count-1%>
<TH>
<%= RS.Fields(f).value%></TH>

when i tried to display is using "RS.Fields(f).value", i only can c ???? so, I think the problem is can even get/read the chinese character from the excel file. Pls help me. :)


 
Old July 21st, 2004, 11:37 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Did you try my suggestion? Was that code added in the HEAD tags and still doesn't help?

_________________________
- Vijay G
Strive for Perfection
 
Old July 22nd, 2004, 12:07 AM
Registered User
 
Join Date: Jul 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes, i tried ur suggestion by putting it in the HEAD tags and it just doesnt work... Any other suggestion. Thanks


 
Old July 27th, 2004, 01:55 AM
Authorized User
 
Join Date: Jul 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to AFei
Default

Simplified Chinese:
Code:
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
Traditional Chinese:
Code:
<meta http-equiv="Content-Type" content="text/html; charset=big5">
 
Old July 27th, 2004, 01:51 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

This is the same I suggested in one of my posts. But seems it didn't solve the purpose. Not sure if the original poster is missing something there.

_________________________
- Vijay G
Strive for Perfection





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chinese characters appearing in Access DB countrymusicman Access VBA 1 April 18th, 2007 10:55 AM
Mangling Chinese Characters in a combo box r_georg C++ Programming 1 February 1st, 2007 03:33 PM
Chinese characters rajanikrishna ASP.NET 1.0 and 1.1 Basics 1 April 25th, 2006 10:25 PM
asp:button to display chinese characters liduwan ASP.NET 1.0 and 1.1 Basics 4 January 14th, 2006 09:50 PM
Read XML having japanese and chinese characters mvvramesh XML 0 May 31st, 2004 06:17 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.