Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Support Chinese characters in 2000 SP3a???

Author  Topic 

truptipujara
Starting Member

9 Posts

Posted - 2006-11-13 : 21:58:46
Hello,
We are trying to export Chinese characters from word/excel into Test Director which is running on Microsft SQLServer 2000 Service Pack 3a but it shows as ? since it is not supported.
Can anyone please let me know as to how do I make my SQLServer database support both English and Chinese characters?
Thanks in advance.
Cheers,
Trupti.

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-11-13 : 22:01:41
use a collation like CHINESE_PRC, CHINESE_TAIWAN etc


KH

Go to Top of Page

truptipujara
Starting Member

9 Posts

Posted - 2006-11-13 : 22:07:15
Hi,
Thanks for replying so soon but I am sorry I did not understand. Would u be kind enough to elaborate please?
Cheers,
Trupti.
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-11-13 : 22:25:44
During the installation of SQL Server, don't use the default collation. Change it to CHINESE_PRC or CHINESE_TAIWAN etc.

Also read about collation in the Books On Line


KH

Go to Top of Page

truptipujara
Starting Member

9 Posts

Posted - 2006-11-15 : 01:19:41
Hi,
Thanks for your response.
From what the document says and what our current environment is, it is not practically feasible for us to change the collation for the Microsoft SQLServer instance of the database. I am thinking that it would be better if we use the COLLATE clause. Any ideas?
Cheers,
Trupti.
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-11-15 : 01:23:59
then create the table / column with the collation you want.

create table <table_name>
(
column_name varchar(100) COLLATE <collation name> NULL
)



KH

Go to Top of Page

mcrowley
Aged Yak Warrior

771 Posts

Posted - 2006-11-15 : 11:26:15
Using nvarchar for the columns you should be able to store chinese characters with no problems no matter the collation. How they sort will be affected by the collation, but not whether they can be stored. The computer you are viewing the data from may not have a font able to deal with the character set, and as a result displays ??? in place of the characters it does not recognize. Find the appropriate Windows CD for the machine you want to display the characters on, and install the character sets.
Go to Top of Page

truptipujara
Starting Member

9 Posts

Posted - 2006-11-16 : 03:22:04
Hi,
Thanks for your responses. But I have an existing database with existing table REQ with one of the fields RQ_REQ_COMMENT defined as text(16). Since I cannot use alter column to ntext, I think I should use "alter table REQ RQ_REQ_COMMENT text(16) COLLATE CHINESE_PRC NULL". But will it be able to store both English and Chinese characters?
Thanks,
Trupti.
Go to Top of Page

AndrewMurphy
Master Smack Fu Yak Hacker

2916 Posts

Posted - 2006-11-16 : 12:21:01
the 16 in TEXT is the length of the pointer to the TEXT storage area.....this area would cope with storing data longer than 16....don't focus on the 16.

re having 2 text or to be more accurate 1 text + 1 ntext column....why do you want both?
why not drop the text and add the ntext?
Go to Top of Page

mcrowley
Aged Yak Warrior

771 Posts

Posted - 2006-11-17 : 09:41:20
A text datatype will not store chinese characters, unless your collation is Chinese. Even then, you would get a maximum of 255 characters. You need to change the column to ntext. The best way to do this, is probably to export the data, build a new table, then re-import.
Go to Top of Page

truptipujara
Starting Member

9 Posts

Posted - 2006-11-20 : 01:07:44
Hello,
Sorry but it does not work still. I have made the column to be ntext but still the same problem. Does it mean that I shall have to alter the database or is there any other alternative?
Thanks,
Trupti.

Go to Top of Page

mcrowley
Aged Yak Warrior

771 Posts

Posted - 2006-11-20 : 10:31:07
Just to make sure this is not a client character set problem, try this:

select unicode (textcolumn)
from table
where ...

Pick a row, where you believe the first character should be a Chinese character. You should be able to confirm the character from the code at www.unicode.org.
Go to Top of Page

truptipujara
Starting Member

9 Posts

Posted - 2006-11-21 : 01:25:35
All the records in the table have English as the 1st character and after 20 English characters, Chinese characters start.
Example: The CD Management Subsystem shall support a CD Administration Service to administer the Business CD [ACC.RFP 7.4.4 Parameter Management] [ACC.RFP.APP 1 2. System structure and functions of different levels] [BEI-00044 CD Management 2] "CD¹ÜÀí×Óϵͳ½«Ö§³ÖCD¹ÜÀí·þÎñ£¬ÒÔ±ã¶ÔÒµÎñCD½øÐйÜÀí¡£[ACC.RFP 7.4.4 ²ÎÊý¹ÜÀí] [ACC.RFP.APP 1 2. ²»Í¬¼¶±ðµÄϵͳ½á¹¹ºÍ¹¦ÄÜ] [BEI-00044 CD ¹ÜÀí 2]"
Go to Top of Page

mcrowley
Aged Yak Warrior

771 Posts

Posted - 2006-11-21 : 09:49:43
Then try this:

select unicode (substring (textcolumn, n, 1)), substring (textcolumn, n, 1)
from table
where...

Substitute the place in the text field for "n" in both places above. This will display the unicode value and the character itself, or at least what your client can make of that character. You may want to make sure that your query analyzer is displaying the results in a font that can display chinese characters.
Go to Top of Page

truptipujara
Starting Member

9 Posts

Posted - 2006-11-23 : 03:09:24
I get the folloing output when I run the query through Query Analyzer on the SQLServer.
Character Unicode
? 63
T 84
Go to Top of Page

donpolix
Yak Posting Veteran

97 Posts

Posted - 2006-11-24 : 05:00:48
You dont need to look at it in the server itself, as long as it is saved in double-byte column. (nvarchar or ntext), it should be fine. Try querying from any client machine with the character set installed (chinese prc?), or better yet go to control panel->Regional and Language Options
then look for the code page.

Donn Policarpio
Go to Top of Page

truptipujara
Starting Member

9 Posts

Posted - 2006-11-26 : 21:24:32
I tried from the client where East Asian languages have been installed but the Chinese characters are still displayed as ?. I also tried inputting Chinese characters in a record and try to retrieve the same record but no luck. I think the database is not able to store the Chinese characters even though the field is ntext. Also, the server itself does not have East Asian languages supported!!! Any ideas?
Go to Top of Page

truptipujara
Starting Member

9 Posts

Posted - 2006-11-26 : 22:17:59
Thank you very much for all your help. The problem has been solved. After changing the field from text to ntext in the database, the client still had some problems. Even though East Asian languages were supported, the Language for non-Unicode programs was English. When it was changed to Chinese and the PC was rebooted, everything is all fine now.
Go to Top of Page
   

- Advertisement -