Showing posts with label chinese. Show all posts
Showing posts with label chinese. Show all posts

Wednesday, March 21, 2012

Problem with simplified chinese

I have a 3 layer system, SQL Server 2000 database, COM+ dll's (VC++ 6) and
ASP frontend, this system has been in production for quite some time using
english, spanish and portuguese versions. Now I've been asked to test the
system to function with Simplified chinese. The development of the system
was outsourced and we don't have communication with the company (some sort
of legal problems i think).
Now, I've been reviewing the code and recompiled one of the core DLL's for
unicode support with no problems, I've tested the database (SQL Server 2000)
inserting Simplified Chinese characters and the DB supports it fine (the DB
fields are NVARCHAR), in the ASP frontend, the retrievel process (calling
the COM+ DLL functions) works fine displaying this data I inserted directly
in the DB.
However, when I try inserting this data through the ASP frontend I'm getting
errors regarding the length of the strings, I'm testing the data insertion
in a field limited to 100 characters, the data I'm testing are 23 Simplified
Chinese symbols or characters and when I insert them directly in the DB
there is no problem, the DB correctly interprets the string as 23 characters
long, but when I test the length of the same string on the ASP page it says
its 183 characters long, so I'm guessing the ASP code is doing some kind of
implicit conversion, I already tried setting the asp session codepage to
65001 for unicode support with the same outcome. Any ideas or tips?
Sorry for the long post, I would reaaly appreciate any kind of help.
David
David A. Caballero J. wrote:

> Sorry for the long post, I would reaaly appreciate any kind of help.
> David
I have a PDF we devised for clients who want to run our ASP package in
Chinese (unicode) - I think it deals with some of the issues you've come
across. Let me know if I can send it to your hotmail address (I'm
assuming it's genuine) and I'll send it over.
The reason you are seeing more characters is because the chars are
displayed in web page HTML source as numerical codes made up of ASCII chars.

captain_flackTONYBLAIRFROMOFFICE@.hotmail.com
(remove Tony Blair from office to contact me)

Tuesday, March 20, 2012

Problem with searching Chinese in ASP

Hi,
Currently I am having trouble searching Traditional Chinese but not
English and numbers. My host's OS is in English and the asp site is
coded in Big5. It seems to me that some how all the Chinese within the
.txt file are @.#$!@.#$%# and not Chinese. Maybe that's the reason the
search script didn't recognize it.
Here's the test page:
www.owco.ca/searchtest.asp
You can copy and paste only the chinese text into the text field, and
no result will be returned. If you copy and paste the English text,
search result will be returned.
Thank you,
-DavidIn ASP you need to set session.codepage= the code page you are using for
Chinese - it is likely to be Session.CodePage = 950
For ASP.Net you need to configure the culture settings. Please check out
this link for an example.
http://www.indexserverfaq.com/susankongrulez.zip
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
<demidnight@.gmail.com> wrote in message
news:1135670597.170199.240460@.g47g2000cwa.googlegroups.com...
> Hi,
> Currently I am having trouble searching Traditional Chinese but not
> English and numbers. My host's OS is in English and the asp site is
> coded in Big5. It seems to me that some how all the Chinese within the
> .txt file are @.#$!@.#$%# and not Chinese. Maybe that's the reason the
> search script didn't recognize it.
> Here's the test page:
> www.owco.ca/searchtest.asp
> You can copy and paste only the chinese text into the text field, and
> no result will be returned. If you copy and paste the English text,
> search result will be returned.
> Thank you,
> -David
>|||Hi, Thank you for your reply.
I am on ASP 3.0
And the code page is set to:
<%
Response.Charset = "big5"
session.codepage = 950
%>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
And still won't work.

Monday, March 12, 2012

Problem with saving Chinese.

Hi.. I'm trying to save text into SQL 2000 database.

When user enter text in text box , the text save into variable , and show it in confirm page , after save the text to database, all the text turned into "??"

I try to view the data in SQL enterprise Manager / Web Matrix / ASP web page gridview , all of them showing the text fields in "??"

Then I try to add record which come with SQL 2000 enterprise Manager.After save the record , the chinese also turned into "??"

Is there something I need to set for database or server?

Is your datatype VARCHAR, TEXT or CHAR as the datatype on the table columns?

If VARCHAR change to NVARCHAR. If TEXT change to NTEXT. If CHAR change to NCHAR.

If you are using stored procedures (and you should be), you will to amend the parameter declaration on them.

You might want to change the collating sequence on your database to one more appropriate to Chinese (if collating sequence is meaningful for that language), but otherwise you should not need to change anything at the database level.

If this reply provides the anser to your question, please mark as such.

|||all the text are stored in varchar... I'll try to change it to nvarchar|||

yea... it works when I change all the text field type to nnvarchar..