September 1, 2008 at 7:40 pm
my query as following:
i have a list of items in table,all items are written in english like:
education
sports
entertainment
but i want these items in hindi as
शिक्षा
खेल
मनोरंजन
i tried to do so by
insert into tname values('मनोरंजन')
command executed successfully but it does not show hindi when i open table,it shows ?????? like this.
plz solve my problem
September 1, 2008 at 9:11 pm
make sure your data fields are NVARCHAR, not plain old varchar.
after that, make sure when you are inserting the data that you specifically cast them as nvarchar...selecting a varchar into an nvarchar field wills trip out the high characters you are trying to preserve.(use text mode to see the results...grid view will display bars.
select '??????','???','???????' (defaults to varchar, returns ????????????????)
select N'??????',N'???',N'???????'(nvarchar, returns ????????????????)
create table #TMP(myvarchar varchar(60),mynvarchar nvarchar(60) )
insert into #tmp
select '??????','??????'
UNION select N'??????',N'??????'
select * from #tmp
Lowell
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply