tags:

views:

173

answers:

2

Hi all,

When writing Hebrew to a database the text is being written left to right when it should be right to left, as Hebrew is written right to left, my app is writing "hello" and it should be writing "olleh" (in Hebrew of course).

To read the Hebrew into my app I use System.Text.Encoding.GetEncoding(1255);

The text displays correctly in my app but when written to the database it is written left to right. My question is what am I missing when writing the text to the db?

Many thanks Jonathan

+1  A: 

Codepage 1255 encodes the text in logical, not visual order. Since you said it displays correctly in your app but not in your database, the most likely explanation is that the database tool does not support bidirectional text when you query it interactively. That does not matter, since the users don't directly query the database. Your app does, and then properly displays the bidirectional text.

jleedev
A: 

Is your database set up with a sort order/collation that is right-to-left? For example, SQL Server sort order 138 = Dictionary order, case-insensitive, for use with the 1255 (Hebrew) character set.

MikeW