November 23, 2015 at 2:16 am
We have a Hindi language text stored with UTF-8 encoding in IBM DB2 data table. The text looks like 'सायन'. We want the Text to appear as the converted Hindi characters, instead of their ascii values, when importing it to the SQL Server NVARCHAR column.
Had anyone done such a conversion before. Please guide.
November 23, 2015 at 6:31 am
I'm not sure what's the problem. SQL Server will handle unicode characters just fine.
--Do a direct select
SELECT N'????'
--Using a table
CREATE TABLE #HindiText( myString nvarchar(10));
--Insert into...Select
INSERT INTO #HindiText SELECT N'????';
SELECT * FROM #HindiText;
--Clean the table
DELETE FROM #HindiText;
--Insert into...Values
INSERT INTO #HindiText VALUES (N'????');
SELECT * FROM #HindiText;
GO
DROP TABLE FROM #HindiText
Unless, of course, that you mess up and generate an implicit conversion to ASCII.
SELECT '????'
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply