Read Chinese Character From SQL(SQL Server 2005) Database Table Column And Display Chinese Character

Feb 1, 2008

Hi!

I have a table like this below and it doesn't only contain English Names but it also contain Chinese Name.
CREATE TABLE Names
(FirstName NVARCHAR (50),
LastName NVARCHAR (50));
I tried to view the column using SQL Query Analyzer, It didn't display Chinese Character.
I know that SQL Server 2005 is using UCS-2 Encoding and Chinese Character uses Double Byte Character Set (DBCS) Encoding.
I want to read the FirstName and LastName columns and display in Window Form Data Grid and ASP.NET Grid View.
I tried to use this code below and it didn't work. It convert some of the English Name to Chinese Character and it display the chinese character and some still in the original unreadable characters.
Does anybody know how to read those character from SQL Table and display the correct Chinese Character without converting the English Name into Chinese also?
Thanks

int codePage = 950;
StringBuilder message = new StringBuilder();
Encoding targetEncoding = Encoding.GetEncoding(codePage);
byte[] encodedChars= targetEncoding.GetBytes(str);
.
message.AppendLine("Byte representation of '" + str + "' in Code Page '" + codePage + "':");
for (int i = 0; i < encodedChars.Length; i++)
{
message.Append("Byte " + i + ": " + encodedChars);
}

message.AppendLine(" RESULT : " + System.Text.Encoding.Unicode.GetString(encodedChars));
Console.Writeline(message.ToString());

View 1 Replies


ADVERTISEMENT

Database Level Setting : Allow User Input Chinese Character~

Jul 16, 2007

Dear all,



To allow users enter chinese character into table, I did try to change the field type to nchar and this is workable. But I have few hundred tables.. Is there anyway to change the setting in easier way? by instead change the field type one by one for each table?



I tried change the collation to Chinese_PRC_90_BIN for the database, but it is not support chinese input..



Any Idea?



Thanks.

View 4 Replies View Related

Can The Data Viewers Display Chinese Characters?

Jan 11, 2007

Is there a way to change the font that the data viewer uses, so that the Chinese characters don't appear as boxes?
The data viewer displays Chinese characters as boxes, something similar to [_], at least on a computer with the following regional settings.

get-wmiobject CIM_OperatingSystem | ft OSLanguage, CodeSet, Locale

OSLanguage CodeSet Locale
---------- ------- ------
1033 1252 0409The data itself is flowing correctly into the target database with a pipeline data_type of DT_WSTR. The ideograms can be seen by query utilities which supports a unicode font (e.g. Management Studio).

View 3 Replies View Related

How To Display UTF-8 Chinese Characters In Reporting Services

Jun 11, 2007

Hi,

We have stored some chinese characters in SQL database with datatype as nvarchar, but they are displayed in RS as some weird characters.

like this: 耹±Ã¥€¢€ 耹±Ã§¾Å½Ã¨¸Ã¨€°Ã¥€¢€ Ã¥€¹„¢(耚¡)Ã¥€¦¬Ã¥¸Ã¥°Ã§£Ã¥Ë†€ Ã¥€¦¬Ã¥¸



When we code the asp pages, we put the following on each page to display the chinese characters properly.



<meta http-equiv="CONTENT-TYPE" content="TEXT/HTML; CHARSET=UTF-8">



So my question is what do I need to do in RS in order to show the chinese characters properly as well ?



Many thanks!

View 8 Replies View Related

Can't Store Chinese In SQL Database

Aug 23, 2006

update Food set FoodName = ' æ??ä»?' where ID = 100

in database as ??

View 10 Replies View Related

How To Design Database For Chinese And Japanese Characters

Aug 23, 2007

I need a small confirmation regarding storing the Chinese and Japanese characters in sql server. Can we store Chinese and Japanese characters on a same database with Chinese Collation? Or else we need to store it separately with respective collations.
I tried to store both characters on db with Chinese collation it works but I am not so sure if it is right way to do so. Please confirm on this as we are doing research stage to build website in Chinese and japanese.
Thanks in advance.

View 3 Replies View Related

Database Collation: Chinese, Japanese, Korean

Jul 28, 2006

My application supports multiple languages/locales in a single database. Some of our new customers want to support Chinese, Japanese, Korean, Italian, Spanish, and German in addition to English. Supporting the Latin based languages is not a problem. But I am having trouble finding a collation sequence that allows me to store the other double byte languages in the same database correctly.

I have found changing the data types from text, char, varchar to ntext, nchar, nvarchar and adding an N in front of the various strings that getting inserted seems to work:

insert into CONTENTDATA (recordid, xml)
values (newid(), N'<CHANNEL1><FILE1/><TEXT1><![CDATA[和红魔拉拉队的动感精神
]]></TEXT1><TEXT3><![CDATA[和红魔拉拉队的动感精神]]></TEXT3></CHANNEL1>');

But this is not going to be a practical solution for us. Is there a collation sequence that would allow us to store multiple locales like we do in Oracle (AL32UTF8)?

Thanks in advance

Dov Rosenberg

View 1 Replies View Related

Table-valued Function Does Not Accept Chinese Characters As Parameter

Nov 15, 2007

I have a table-valued function in mssql 2005 as below:
ALTER FUNCTION fn_test{   @test nvarchar(1000)}RETURNS@TEMP TABLE{   test nvarchar(1000)}ASBEGIN   INSERT INTO @TEMP   SELECT @test
   RETURNEND
Everytime, I passed in chinese character (@test), such as æ¸¬é©—, the function will return ????.  What should I do for the table-valued function, so that the chinese character can be passed in?  Please help.
Note: I can search and get the chinese characters if I use stored procedures; and the columns in the tables can store chinese chararcters as well.   Only table-valued function is not working with the chinese characters.  Is it a bug from MSSQL 2005?
 
 

View 4 Replies View Related

T-SQL (SS2K8) :: Find String Before Character When Character Appears Multiple Times

May 17, 2015

I have a table that contains file paths as

ServernamefolderAfilenameA
ServernameFolderBFilenameB

and I need a query to return

ServernamefolderA
ServernameFolderB

I tried

SELECT DISTINCT left(Source, charindex('', Source)- 0) AS String
FROM Table

But that removes everything after the first and I need it to return all data before the last

View 5 Replies View Related

T-SQL (SS2K8) :: Replace Multiple Occurrences Of Same Character With Single Character

Aug 6, 2015

I have the following scenario, The contents of main file are like :

ServerCentral|||||forum|||||||||||||||is||||||the||best
so||||||be|||||on||||||||||||||||||||||||||||||||||||||||||||it

And I need the output in the following form:

ServerCentral=forum=is=the=best
so=be=on=it

The logic being that multiple and consecutive occurrences of the special character, here - pipe , should be replaced by a single special character.

View 5 Replies View Related

Select Part Of Character String Based On A Character

Apr 15, 2004

I have data in a column that starts with 1-4 characters followed by a dash then followed by an number of characters (ex: EU-Surgery).

How do I select everything to the right of the dash when the number of characters to the left of the dash varies?

View 3 Replies View Related

Transact SQL :: Read Unicode Character Using OPENROWSET

Jun 27, 2012

I am reading text file using OPENROWSET command. The read is successful. But the UNICODE characters in the file is not showing properly in the output.I am using a sql like below:

select
*
FROM
OPENROWSET('MICROSOFT.ACE.OLEDB.12.0','Text;Database=ppa20-igloo-fsMODELSTORECR106_GIM_UKGISourceFilesProcess;HDR=Yes;Format=Delimited(|)',
'SELECT * FROM [RUW_P_Reinsurers_Aviva_and_Others_Map.txt]')

how should I read the unicode characters correctly.

View 8 Replies View Related

How To Set-up Sql Server 2000 In Win2k3 Server To Store Big-5 Chinese Data

Jul 23, 2005

I am using Windows 2003 Server English Version. I wanna store the big-5data so I install the sql server 2000 as if i install it in the Windows2000 with Server Collation of the Chinese_Taiwan_Stroke_CL_AS.However, the data are stored into the database server in unicodeinstead of big-5 in that of windows 2000 OS.I would like to ask how i can set so that the Sql Server 2000 can storethe big-5 data

View 6 Replies View Related

Return Left-most Character From 8 Character String

Oct 1, 2014

I'd like to return the left-most character from an 8 character string & the third from the left character too.

Like this ABC00123 returns AC

$query = "SELECT LEFT(uninum,3), RIGHT(uninum,5), clmarea, Date FROM tblunimov";
$result = mysql_query($query) or die(mysql_error());

echo "<div class='tblstyle1'>";
echo "<table class='tblstyle1'>";
echo "<tr><th>ini</th><th>item</th><th>area</th><th>date</th></tr>";
while($row = mysql_fetch_array($result)){

[Code] ....

View 5 Replies View Related

What Collation To Have Ascii Character 160 Display In Query Results

Feb 11, 2008

I have an issue with some data that has a leading ASCII char 160 (the "a" with the accent mark) but it shows in query results as a space.


... where customername like char(160) + '%'

returns 2 rows but shows the customer name with a leading space. How would I change the collation or do otherwise to get this character to display correctly in the results?

Thanks!

-Dave

View 6 Replies View Related

Input Chinese

Oct 5, 2006

Hi,I need to input Chinese character into the table of the database.  I did try to install/run both Chinese/English version of Visual Studio into Chinese/English version of Server 2003 but it still didn't work.Please help !stephen   

View 3 Replies View Related

Chinese Data

May 31, 2007

  please can you tell how you managing database for chinese do we need to specify collation even if we use utf-8 how to use utf-8thanks in advance

View 3 Replies View Related

Chinese Query

Feb 5, 2007

when i use query with some chinese character, eg:
select '你好嗎'
output: ????????

As you can see the output cannot display chinese.
what can I do?

View 2 Replies View Related

SQL, Access And Chinese

Jan 15, 2008


Hello,

I hope somebody can help me with this. I have different points to solve. However, I€™ll make some simple questions and then I€™ll decide to continue explaining.
In a pc having Windows 2003 Server and SQL 2005 in English lang installed, II can see into the fields of an Access db Chinese characters. I€™ve made a tool to transfer the information to a new SQL db, but when I go to see into table€™s fields, I only see €œ????€?. I€™ve tried to make the import directly from SQL Server, but the result was the same.
When I read the values from a VB6 app, the ones read from Access are correctly showed, but not the one read from SQL. In both cases I see only €œ?????€?.
But, using in another pc with regional settings changed to Chinese the same application, I can see all the Chinese labels. Shall I need to make the transfer with the Chinese lang downloaded into the pc? Shall I need to set the db in a particular way?
I have inside the db some tables having latin characters (European names) that I need to maintain, so there will be data in at least 2 languages: Chinese and English.
The second problem is regarding a text box control to insert numeric value. If I insert the numer 3.4456, once the value is added to the db, it returns 34456. Decimal point is ignored. This happens in machines having Windows in Chinese and Windows in English with reg. settings changed to Chinese.
Thanks in advance for your help.

View 3 Replies View Related

Chinese Characters

Mar 27, 2007

How do I have to setup my SQL Server in order to be able to introduce (save) Chinese Characters additionally?

View 1 Replies View Related

Problem With Saving Chinese.

Mar 6, 2007

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?

View 3 Replies View Related

Sorting Chinese Characters In SQL

Sep 29, 2005

I have a column (ntext) and set collation to be Chinese-PRC, when I say Order By colName, how the column is sorted.

View 8 Replies View Related

Chinese Characters In SQL 2000

Nov 22, 2004

Hi All

I have to develop a website which allows users to enter their comments into Chinese languages. I need sql2000 to support the chinese characters.

I am experienced .net web programmer, but have very little knowledge on the database side. Would really appreciate any help on this

THanks
Jignesh

View 13 Replies View Related

Import Chinese Characters Help

May 9, 2008

Hi

I need some help importing Chinese characters into my SQL Server 2005 database.

I have the data in an access database, which contains a mixture of english and chinese characters.

Now when I import this into SQL, the Chinese characters are not imported in correctly.

I'm aware of that these characters may need to be imported as unicode, but I don't have an option to change this when importing from the Access table.

Please can somebody assist.

many thanks!

View 3 Replies View Related

Exporting To PDF With Chinese/Jap Char

Aug 28, 2007

Hi all!

I have created a report that may display Chinese, Korean and Japanese characters. Everything is fine on the report itself when rendered in the browser, all the characters are showing as it should be, but when I try to export it to pdf, all these characters turned into question marks ????.

I've tried installing Adobe Asian pack, but still I can't make these character shows up.

Can anyone shed light on this? I'm doing a local report only BTW. Would there be any effect if I'll do it as a server report?

Any thing that could get me started would be greatly appreciated.

Thanks in advance.

View 3 Replies View Related

Importing Chinese Text

Jul 23, 2005

Hello,I have some multibyte characters and I want to put them into table fields.how I can do this? Just storing them will result in a ? when reading /showing them.thanks & regardsMark

View 1 Replies View Related

Chinese Garbled In MSSQL2000 - By ASP

Jan 31, 2007

Hi experts,

Here I got some problems with my application. (ASP & English Version SQL Server 2000)

As we are using English MSSQL Server 2000, we got some new functions and we have to facilitate support of Chinese characters in the DB. I have set the collation for those Chinese fields already and those queries or Stored Procs for Chinese are working fine, ONLY if I execute them in Enterprise Manager. Chinese characters can be displayed in the relevant tables.

However here comes the big problem and I got really frustrated. As we will provide user interface in ASP pages, we 'll let users to insert the information which will be sent to the DB. If there's Chinese characters in the query string, the Chinese characters added in the DB would be garbled.

e.g. EXECUTE proc_TestChinese 'XYZ', 'test123' (assume XYZ be those Chinese words)

I am wondering if there's any way I can solve this problem. Should I add special handling for these Chinese words? I have set the ASP pages in UTF-8 or Big5 encoding but it doesn't help. Hope you experts can show me the way out of the mess. Thanks in advance!

Manfred



View 4 Replies View Related

Japanese And Chinese Text With MSSQL

Sep 6, 2006

Hi,my client requires a multilingual website including Japanese and Chinese. When I try to add text in Japanese and Chinese into the MSSQL database it says the data is not consistant with the data type or length, do you know how I can get round this??any help or direction would be greatly appreciatedMike

View 1 Replies View Related

Saving Chinese, And Vietnamese And Armenian

Apr 3, 2008

Can anyone point us to a tutorial or explain how to save data
in languages other than english to sql2000 database.

I see that the field must be nvarchar or ntext but do not understand
unicode.



Howard

View 2 Replies View Related

Chinese Chars Through Stored Procedures...

Jul 20, 2005

Hi,I have a problem with my Stored Procedures...Recently we decided to change the type of our column in our databse fromvarchar to nvarchar because of new customers (chinese).Everything works fine EXCEPT the stored procedures... When i try to passchinese characters for a simple SP that those a basic insert in my table, itinserts ??? instead of chinese characters...Did i miss something obvious?Thanks a lot!Etiennep.s.: you can email me at Join Bytes! or reply on thisnewsgroup.

View 1 Replies View Related

Chinese And Japanese Characters In Same Colation

Jul 20, 2005

SQL 2000, latest SP. We currently have the need to store data from aUTF-8 application in multiple languages in a single database.Our findings thus far support the fact that single-byte anddouble-byte characters can be held in the same DB without issue.However, when holding two sets of DIFFERING double-byte characters(i.e. Chinese and Japanese) there are issues.Since Japanese has a superset of both Kanji and Katakana charactersit's our theory that the Japanese collations will hold Chinese as well(Mandarin).1) Has anybody tried to store multiple languages in the same db? Whatcollation was used?2) Is it possible to change collation by table?3) Which collation of Japanese should be used for best multibyte,UTF-8 character sets? Currently we're testing with Japanese_CI_AS(encoding MS932).Any and all responses appreciated,Join Bytes!

View 1 Replies View Related

Re-Installation Of SQLExpress On XP SP2 Chinese Tra Version

Jan 6, 2007

When I installed SQL Express first time a few days ago, it work ok. But, after removing all sql server componets through 'control panel'->'add or remove programs,' something seems wrong in the registry because the re-installation of SQLExpress will never success with an error

-------------------

- Performance Monitor Counter Requirement (Error)
Messages
Performance Monitor Counter Requirement

The System Configuration Check for Performance Monitor counter registry value has failed. For details, see How to: Increment the Counter Registry Key for Setup in SQL Server 2005, in the readme file or in SQL Server Books Online.


------------------------

in setup configuration checker. I follow the instructions in help page and try to set the values "Last Counter" and "Last Help" in '[HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionPerflib]' as same as the values "Counter" and "Help" in '[HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionPerflib]'.........but the data type are dword and string resp. So, setup checker will think the values are different and no way to reinstall the SQLExpress.

Can anyone tell me how to fix it or just let me know SQLExpress not for Chinese XP SP2?

Thank you

View 3 Replies View Related

Where Clause Not Working When Used With Chinese Charecters

May 13, 2008

Dear Friends,
I'm preety new to the concept of globalization & all. Basically my requirments is very straight-forward.
I have a table structure is as follwos:

IntCtryCode (auto-increment fileld)
VCharCtryName - NVarchar(30)
VCharCtryDesc - NVarchar(100)

the second & the third column has data in Simplified chinese and their collation is Chinese_PRC_90
The data is getting properly inserted and retrived.

But i'm not able to use "where" clause in the query where the value specified is Chinese.
I tried LIKE as well as in IN, but everytime empty dataset is returned.

Is there anything special i have to take care of to enable this feature.

Thanks in advance.
Regards,
Rohan Wadiwala

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved