Converts between a logically ordered string and a visually ordered
string, by reversing the order of Hebrew and Arabic characters while preserving
the order of Latin words and numbers.
Category: |
BIDI text handling
|
Alignment: |
left
|
- w
-
specifies the width of the output field.
Default: |
1 if w
is not specified |
Range: |
1-32767 |
In the Windows operating environment, Hebrew and Arabic
text is stored in logical order. The text is stored in the order that it is
written and not necessarily as it is displayed. However, in other operating
environments, Hebrew text is stored in the same order it is displayed. SAS
users can encounter Hebrew and Arabic text that is reversed. Such situations
can occur when you use SAS/CONNECT or other software to transfer SAS data
sets or reports with Hebrew and Arabic text from a visual operating environment
to a logical one. The $BIDI format is a format that reverses Hebrew and Arabic
text while maintaining the order of numbers and Latin-1 words.
Operating Environment Information: In mainframe operating environments, this format is designed to work
with NewCode Hebrew and Arabic. Some mainframe operating environments might
experience unsatisfactory results, because they use the OldCode Hebrew or
Arabic encoding. There is a hotfix for this encoding on SAS Institute's Web
site: http://support.sas.com/. ![[cautionend]](../../../../common/63294/HTML/default/images/cautend.gif)
The $BIDIw. format performs
a reversing function similar to the $REVERJw.
format, which writes character data in reverse order and preserves blanks.
$BIDIw. behaves in the following way:
-
$BIDIw. reverses the order of words
and numbers in a specified string, preserving blanks. Latin-1 words and numbers
themselves are not reversed, only their order in the string.
-
When $BIDI encounters a word consisting of Hebrew or Arabic characters
in the text string, the characters in the Hebrew or Arabic word are reversed
and the position of the Hebrew or Arabic word is reversed in the string.
This example demonstrates how $BIDIw. reverses Hebrew characters.
The Hebrew is reversed in the string. The Hebrew characters in the words are
also reversed.
![[BIDI example containing Hebrew characters]](images/bidi1.gif)
The following lines are written
to the SAS
log:
![[$BIDI example showing lines written to SAS log with Hebrew characters reversed]](images/bidi2.gif)
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.