May 5, 2009 at 9:29 am
Hi,
I am trying to add a Hebrew (or Arabic) mixed with English sentence into a column.
I am copying the sentence from Word 2007 and pasting it into SQL Server 2005.
The sentence is in order until I paste into SQL Server 2005.
The query windows doesn't seem to know how to handle two languages with different Reading Order.
Any suggestions?
Thanks in andvance.
May 6, 2009 at 6:28 am
Hi
Just tried and works:
DECLARE @t TABLE
(
Id INT NOT NULL IDENTITY,
Country NVARCHAR(100),
PRIMARY KEY CLUSTERED
(Id)
)
INSERT INTO @t
SELECT N'Germany'
UNION ALL SELECT N'Deutschland'
UNION ALL SELECT N'???????'
SELECT *
FROM @t
WHERE Country IN (N'Germany', N'Deutschland', N'???????')
Important
Because you try to insert Unicode data you have to use the "N" for a Unicode string
Greets
Flo
May 6, 2009 at 8:23 am
Thanks for the response Flo.
What I am trying to do is put a herbrew (or arabic) mixed with english text into a coloumn.
I have a Word document with a sentence that has herbrew and english words in it.
Ex. ???????? ?? ????? ????????, ??????? ?? TEST ???? ???? ?? ????? ???? ???? ?????? ?????
When I copy it from Word and paste it into the query window of SQL 2005 I get:
???? ???? ?? ????? ???? ???? ?????? ????? TEST ???????? ?? ????? ????????, ??????? ??
The text flips! 🙁
I also installed hebrew and arabic languages on my computer.
I seems that when I copy straight hebrew or straight arabic into the query window it comes out ok...but when a sentence has english in it, it flips the text.
any other suggestions?
May 6, 2009 at 8:25 am
P.S. I am using the N infront of my single quotes. I think my issue is mixing languages with different reading orders. rtl vs ltr
May 6, 2009 at 8:56 am
Hi
I misunderstood your initial post. I just tried and can reproduce the same error. Sorry I have no other suggestions. Maybe somebody else can help.
Best wishes
Flo
May 6, 2009 at 8:58 am
Thank you for you time Flo.
May 22, 2009 at 7:05 am
Does it have to be pasted in an entire string, or can it be constructed? Something like:
DECLARE @Text nvarchar(255)
SET @Text = N'???????? ?? ????? ????????, ??????? ??' + N' TEST ' + N'???? ???? ?? ????? ???? ???? ?????? ?????'
PRINT @Text
May 22, 2009 at 7:32 am
There are two ways you could fix this because both Arabic and Hebrew are right to left languages so create a test database with Hebrew or Arabic and add your text take either a table or just the column of that database and add it to your existing database. I have an ASPNETDB with Hebrew collation so create a database collation choose Hebrew and then add a table and columns then your text, if you are still having problem do the same with Arabic. One of both languages will take all three.
Kind regards,
Gift Peddie
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply