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)
 Japanese

Author  Topic 

SamC
White Water Yakist

3467 Posts

Posted - 2003-05-09 : 15:33:37
I've setup my workstation to support UTF-8. Notepad, Dreamweaver both show Japanese characters nicely.

I've built a set of INSERTS for Query Analyzer to insert Japanese text into an NVARCHAR table. Boopkas! It doesn't work.

In fact

PRINT 'Japanese character'

will display '?'

And

PRINT UNICODE('any japanese character')

always gives a value of 63.

Does QA or SQL 2000 have an international setting that must be enabled before this stuff will work?

Sam

Arnold Fribble
Yak-finder General

1961 Posts

Posted - 2003-05-09 : 16:20:25
There's a distinction in SQL Server between 8 bit character and Unicode literal strings.
You need to make it a unicode string by prepending an N or the characters will get turned into the nearest equivalent in CP1252 or whatever, or ? if there isn't an equivalent.

So something like
PRINT N'‘å'
(bet that doesn't work)
PRINT N'japanese character'


Edited by - Arnold Fribble on 05/09/2003 16:22:29
Go to Top of Page

SamC
White Water Yakist

3467 Posts

Posted - 2003-05-09 : 16:28:37
Arnold,

Ahhhhh Haaaaaaaaaa! (I've been working on this for 2 days. It's nice to see it working...

Have a few beers on me ..



Sam


Go to Top of Page
   

- Advertisement -