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
 General SQL Server Forums
 New to SQL Server Programming
 Unicode Issue

Author  Topic 

mageshks
Yak Posting Veteran

59 Posts

Posted - 2008-05-13 : 02:48:40
Im having SQL server 2005.

I want to have arabic and japanese unicode text within a table.
The following is my table .

create table lang
(
sampletext nvarchar(50)
)



insert into lang values ( N'??? ???????')


insert into lang values ( N'????').

i could see the arabic , if i do the select * from lang.
But i cound see only the junk characters for japanese .
Why this is happening?.
How to rectify this?

Thanks in advance
Magesh

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-05-13 : 03:11:59
Do you have the proper language installed on your computer?



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

mageshks
Yak Posting Veteran

59 Posts

Posted - 2008-05-13 : 03:26:59
Peso , Its all unicode .
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-05-13 : 04:07:23
Yes, the data is stored as UNICODE at the server.
But... Do you have the proper CODE PAGE installed?



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

Arnold Fribble
Yak-finder General

1961 Posts

Posted - 2008-05-13 : 08:43:52
It's not really clear from what you posted what characters you inserted into lang. Possibly that's the fault of the forum software.
If you insert the strings like this, what do you get?

-- Arabic:
INSERT INTO lang VALUES (NCHAR(1575) + NCHAR(1604) + NCHAR(1593) +
NCHAR(1585) + NCHAR(1576) + NCHAR(1610) + NCHAR(1577))

-- Japanese:
INSERT INTO lang VALUES (NCHAR(26085) + NCHAR(26412) + NCHAR(35486))

SELECT * FROM lang


If you're seeing square boxes instead of proper glyphs for the characters, the output is not being displayed in a font that contains those glyphs. In SSMS, "Results to text" seems to do better than "Results to grid" in this regard: in text mode I get the Arabic rendered in proper right-to-left order and the Japanese appears as expected. In grid mode the Arabic appears in LTR (and with each character in its isolated form) and I have to switch to a font (like Arial Unicode) that contains glyphs for Japanese characters before I see anything other than square boxes.
Go to Top of Page

mageshks
Yak Posting Veteran

59 Posts

Posted - 2008-05-13 : 09:15:25
Thanks Peso , Arnold
I could see the Japanese letters in "Result to text" mode
Go to Top of Page
   

- Advertisement -