dbTalk Databases Forums  

String Function in Hebrew

microsoft.public.sqlserver.tools microsoft.public.sqlserver.tools


Discuss String Function in Hebrew in the microsoft.public.sqlserver.tools forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
lshaki@gmail.com
 
Posts: n/a

Default String Function in Hebrew - 05-10-2008 , 07:44 AM






I have a table containing Hebrew charachters
When I run String functions such as LEFT & SUBSTRING, that results
returned are in revers order.
I.E: The function LEFT will return the Right most charachters.

Try this

declare @a nvarchar(100)
set @a = 'ישראל אורט 11'
select right(@a, 2)

The results I get for is '11' instead of 'יש'

Any idea?

Reply With Quote
  #2  
Old   
Russell Fields
 
Posts: n/a

Default Re: String Function in Hebrew - 05-12-2008 , 08:51 AM






lshaki,

Interesting. This is the difference between the rendering of character
order visually and the way it is stored physically. Examine the results of
this query, added to your script.

select convert (varbinary(100),@a)

0xD905E905E805D005DC052000D005D505E805D80520003100 3100

You will notice that the rightmost characters are '11' in the string. Now,
instead of using '11' use '12' for your Hebrew string prefix and run the
script again. This time you will get:

0xD905E905E805D005DC052000D005D505E805D80520003100 3200

So, you can see that the string is not simply reversed. If it were that
simple, the last two characters would show as 32003100. So the rendering of
the Hebrew string is aware of the numerics reading left to right, while the
characters read right to left. Hebrew is technically a Bi-directional
Language (BIDI) not strictly right-to-left.

So, LEFT, RIGHT, SUBSTRING, etc all work on the order of data as stored in
the string, but not the order as it appears when rendered visually. (Yes, I
can see why that would be confusing, especially in a string with mixed
left-right and right-left characters.) You might find this article
interesting:
http://technet.microsoft.com/en-us/l.../bb330962.aspx

RLF



<lshaki (AT) gmail (DOT) com> wrote

I have a table containing Hebrew charachters
When I run String functions such as LEFT & SUBSTRING, that results
returned are in revers order.
I.E: The function LEFT will return the Right most charachters.

Try this

declare @a nvarchar(100)
set @a = '????? ???? 11'
select right(@a, 2)

The results I get for is '11' instead of '??'

Any idea?



Reply With Quote
  #3  
Old   
Russell Fields
 
Posts: n/a

Default Re: String Function in Hebrew - 05-12-2008 , 08:51 AM



lshaki,

Interesting. This is the difference between the rendering of character
order visually and the way it is stored physically. Examine the results of
this query, added to your script.

select convert (varbinary(100),@a)

0xD905E905E805D005DC052000D005D505E805D80520003100 3100

You will notice that the rightmost characters are '11' in the string. Now,
instead of using '11' use '12' for your Hebrew string prefix and run the
script again. This time you will get:

0xD905E905E805D005DC052000D005D505E805D80520003100 3200

So, you can see that the string is not simply reversed. If it were that
simple, the last two characters would show as 32003100. So the rendering of
the Hebrew string is aware of the numerics reading left to right, while the
characters read right to left. Hebrew is technically a Bi-directional
Language (BIDI) not strictly right-to-left.

So, LEFT, RIGHT, SUBSTRING, etc all work on the order of data as stored in
the string, but not the order as it appears when rendered visually. (Yes, I
can see why that would be confusing, especially in a string with mixed
left-right and right-left characters.) You might find this article
interesting:
http://technet.microsoft.com/en-us/l.../bb330962.aspx

RLF



<lshaki (AT) gmail (DOT) com> wrote

I have a table containing Hebrew charachters
When I run String functions such as LEFT & SUBSTRING, that results
returned are in revers order.
I.E: The function LEFT will return the Right most charachters.

Try this

declare @a nvarchar(100)
set @a = '????? ???? 11'
select right(@a, 2)

The results I get for is '11' instead of '??'

Any idea?



Reply With Quote
  #4  
Old   
Russell Fields
 
Posts: n/a

Default Re: String Function in Hebrew - 05-12-2008 , 08:51 AM



lshaki,

Interesting. This is the difference between the rendering of character
order visually and the way it is stored physically. Examine the results of
this query, added to your script.

select convert (varbinary(100),@a)

0xD905E905E805D005DC052000D005D505E805D80520003100 3100

You will notice that the rightmost characters are '11' in the string. Now,
instead of using '11' use '12' for your Hebrew string prefix and run the
script again. This time you will get:

0xD905E905E805D005DC052000D005D505E805D80520003100 3200

So, you can see that the string is not simply reversed. If it were that
simple, the last two characters would show as 32003100. So the rendering of
the Hebrew string is aware of the numerics reading left to right, while the
characters read right to left. Hebrew is technically a Bi-directional
Language (BIDI) not strictly right-to-left.

So, LEFT, RIGHT, SUBSTRING, etc all work on the order of data as stored in
the string, but not the order as it appears when rendered visually. (Yes, I
can see why that would be confusing, especially in a string with mixed
left-right and right-left characters.) You might find this article
interesting:
http://technet.microsoft.com/en-us/l.../bb330962.aspx

RLF



<lshaki (AT) gmail (DOT) com> wrote

I have a table containing Hebrew charachters
When I run String functions such as LEFT & SUBSTRING, that results
returned are in revers order.
I.E: The function LEFT will return the Right most charachters.

Try this

declare @a nvarchar(100)
set @a = '????? ???? 11'
select right(@a, 2)

The results I get for is '11' instead of '??'

Any idea?



Reply With Quote
  #5  
Old   
Russell Fields
 
Posts: n/a

Default Re: String Function in Hebrew - 05-12-2008 , 08:51 AM



lshaki,

Interesting. This is the difference between the rendering of character
order visually and the way it is stored physically. Examine the results of
this query, added to your script.

select convert (varbinary(100),@a)

0xD905E905E805D005DC052000D005D505E805D80520003100 3100

You will notice that the rightmost characters are '11' in the string. Now,
instead of using '11' use '12' for your Hebrew string prefix and run the
script again. This time you will get:

0xD905E905E805D005DC052000D005D505E805D80520003100 3200

So, you can see that the string is not simply reversed. If it were that
simple, the last two characters would show as 32003100. So the rendering of
the Hebrew string is aware of the numerics reading left to right, while the
characters read right to left. Hebrew is technically a Bi-directional
Language (BIDI) not strictly right-to-left.

So, LEFT, RIGHT, SUBSTRING, etc all work on the order of data as stored in
the string, but not the order as it appears when rendered visually. (Yes, I
can see why that would be confusing, especially in a string with mixed
left-right and right-left characters.) You might find this article
interesting:
http://technet.microsoft.com/en-us/l.../bb330962.aspx

RLF



<lshaki (AT) gmail (DOT) com> wrote

I have a table containing Hebrew charachters
When I run String functions such as LEFT & SUBSTRING, that results
returned are in revers order.
I.E: The function LEFT will return the Right most charachters.

Try this

declare @a nvarchar(100)
set @a = '????? ???? 11'
select right(@a, 2)

The results I get for is '11' instead of '??'

Any idea?



Reply With Quote
  #6  
Old   
Russell Fields
 
Posts: n/a

Default Re: String Function in Hebrew - 05-12-2008 , 08:51 AM



lshaki,

Interesting. This is the difference between the rendering of character
order visually and the way it is stored physically. Examine the results of
this query, added to your script.

select convert (varbinary(100),@a)

0xD905E905E805D005DC052000D005D505E805D80520003100 3100

You will notice that the rightmost characters are '11' in the string. Now,
instead of using '11' use '12' for your Hebrew string prefix and run the
script again. This time you will get:

0xD905E905E805D005DC052000D005D505E805D80520003100 3200

So, you can see that the string is not simply reversed. If it were that
simple, the last two characters would show as 32003100. So the rendering of
the Hebrew string is aware of the numerics reading left to right, while the
characters read right to left. Hebrew is technically a Bi-directional
Language (BIDI) not strictly right-to-left.

So, LEFT, RIGHT, SUBSTRING, etc all work on the order of data as stored in
the string, but not the order as it appears when rendered visually. (Yes, I
can see why that would be confusing, especially in a string with mixed
left-right and right-left characters.) You might find this article
interesting:
http://technet.microsoft.com/en-us/l.../bb330962.aspx

RLF



<lshaki (AT) gmail (DOT) com> wrote

I have a table containing Hebrew charachters
When I run String functions such as LEFT & SUBSTRING, that results
returned are in revers order.
I.E: The function LEFT will return the Right most charachters.

Try this

declare @a nvarchar(100)
set @a = '????? ???? 11'
select right(@a, 2)

The results I get for is '11' instead of '??'

Any idea?



Reply With Quote
  #7  
Old   
Russell Fields
 
Posts: n/a

Default Re: String Function in Hebrew - 05-12-2008 , 08:51 AM



lshaki,

Interesting. This is the difference between the rendering of character
order visually and the way it is stored physically. Examine the results of
this query, added to your script.

select convert (varbinary(100),@a)

0xD905E905E805D005DC052000D005D505E805D80520003100 3100

You will notice that the rightmost characters are '11' in the string. Now,
instead of using '11' use '12' for your Hebrew string prefix and run the
script again. This time you will get:

0xD905E905E805D005DC052000D005D505E805D80520003100 3200

So, you can see that the string is not simply reversed. If it were that
simple, the last two characters would show as 32003100. So the rendering of
the Hebrew string is aware of the numerics reading left to right, while the
characters read right to left. Hebrew is technically a Bi-directional
Language (BIDI) not strictly right-to-left.

So, LEFT, RIGHT, SUBSTRING, etc all work on the order of data as stored in
the string, but not the order as it appears when rendered visually. (Yes, I
can see why that would be confusing, especially in a string with mixed
left-right and right-left characters.) You might find this article
interesting:
http://technet.microsoft.com/en-us/l.../bb330962.aspx

RLF



<lshaki (AT) gmail (DOT) com> wrote

I have a table containing Hebrew charachters
When I run String functions such as LEFT & SUBSTRING, that results
returned are in revers order.
I.E: The function LEFT will return the Right most charachters.

Try this

declare @a nvarchar(100)
set @a = '????? ???? 11'
select right(@a, 2)

The results I get for is '11' instead of '??'

Any idea?



Reply With Quote
  #8  
Old   
Russell Fields
 
Posts: n/a

Default Re: String Function in Hebrew - 05-12-2008 , 08:51 AM



lshaki,

Interesting. This is the difference between the rendering of character
order visually and the way it is stored physically. Examine the results of
this query, added to your script.

select convert (varbinary(100),@a)

0xD905E905E805D005DC052000D005D505E805D80520003100 3100

You will notice that the rightmost characters are '11' in the string. Now,
instead of using '11' use '12' for your Hebrew string prefix and run the
script again. This time you will get:

0xD905E905E805D005DC052000D005D505E805D80520003100 3200

So, you can see that the string is not simply reversed. If it were that
simple, the last two characters would show as 32003100. So the rendering of
the Hebrew string is aware of the numerics reading left to right, while the
characters read right to left. Hebrew is technically a Bi-directional
Language (BIDI) not strictly right-to-left.

So, LEFT, RIGHT, SUBSTRING, etc all work on the order of data as stored in
the string, but not the order as it appears when rendered visually. (Yes, I
can see why that would be confusing, especially in a string with mixed
left-right and right-left characters.) You might find this article
interesting:
http://technet.microsoft.com/en-us/l.../bb330962.aspx

RLF



<lshaki (AT) gmail (DOT) com> wrote

I have a table containing Hebrew charachters
When I run String functions such as LEFT & SUBSTRING, that results
returned are in revers order.
I.E: The function LEFT will return the Right most charachters.

Try this

declare @a nvarchar(100)
set @a = '????? ???? 11'
select right(@a, 2)

The results I get for is '11' instead of '??'

Any idea?



Reply With Quote
  #9  
Old   
Russell Fields
 
Posts: n/a

Default Re: String Function in Hebrew - 05-12-2008 , 08:51 AM



lshaki,

Interesting. This is the difference between the rendering of character
order visually and the way it is stored physically. Examine the results of
this query, added to your script.

select convert (varbinary(100),@a)

0xD905E905E805D005DC052000D005D505E805D80520003100 3100

You will notice that the rightmost characters are '11' in the string. Now,
instead of using '11' use '12' for your Hebrew string prefix and run the
script again. This time you will get:

0xD905E905E805D005DC052000D005D505E805D80520003100 3200

So, you can see that the string is not simply reversed. If it were that
simple, the last two characters would show as 32003100. So the rendering of
the Hebrew string is aware of the numerics reading left to right, while the
characters read right to left. Hebrew is technically a Bi-directional
Language (BIDI) not strictly right-to-left.

So, LEFT, RIGHT, SUBSTRING, etc all work on the order of data as stored in
the string, but not the order as it appears when rendered visually. (Yes, I
can see why that would be confusing, especially in a string with mixed
left-right and right-left characters.) You might find this article
interesting:
http://technet.microsoft.com/en-us/l.../bb330962.aspx

RLF



<lshaki (AT) gmail (DOT) com> wrote

I have a table containing Hebrew charachters
When I run String functions such as LEFT & SUBSTRING, that results
returned are in revers order.
I.E: The function LEFT will return the Right most charachters.

Try this

declare @a nvarchar(100)
set @a = '????? ???? 11'
select right(@a, 2)

The results I get for is '11' instead of '??'

Any idea?



Reply With Quote
  #10  
Old   
Russell Fields
 
Posts: n/a

Default Re: String Function in Hebrew - 05-12-2008 , 08:51 AM



lshaki,

Interesting. This is the difference between the rendering of character
order visually and the way it is stored physically. Examine the results of
this query, added to your script.

select convert (varbinary(100),@a)

0xD905E905E805D005DC052000D005D505E805D80520003100 3100

You will notice that the rightmost characters are '11' in the string. Now,
instead of using '11' use '12' for your Hebrew string prefix and run the
script again. This time you will get:

0xD905E905E805D005DC052000D005D505E805D80520003100 3200

So, you can see that the string is not simply reversed. If it were that
simple, the last two characters would show as 32003100. So the rendering of
the Hebrew string is aware of the numerics reading left to right, while the
characters read right to left. Hebrew is technically a Bi-directional
Language (BIDI) not strictly right-to-left.

So, LEFT, RIGHT, SUBSTRING, etc all work on the order of data as stored in
the string, but not the order as it appears when rendered visually. (Yes, I
can see why that would be confusing, especially in a string with mixed
left-right and right-left characters.) You might find this article
interesting:
http://technet.microsoft.com/en-us/l.../bb330962.aspx

RLF



<lshaki (AT) gmail (DOT) com> wrote

I have a table containing Hebrew charachters
When I run String functions such as LEFT & SUBSTRING, that results
returned are in revers order.
I.E: The function LEFT will return the Right most charachters.

Try this

declare @a nvarchar(100)
set @a = '????? ???? 11'
select right(@a, 2)

The results I get for is '11' instead of '??'

Any idea?



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.