U_CAPI void U_EXPORT2 ubidi_setPara (UBiDi *pBiDi, const UChar *text, UTextOffset length, UBiDiLevel paraLevel, UBiDiLevel *embeddingLevels, UErrorCode *pErrorCode) Perform the Unicode BiDi algorithm
Perform the Unicode BiDi algorithm. It is defined in the Unicode Technical Report 9, version 5, also described in The Unicode Standard, Version 3.0 .This function takes a single plain text paragraph with or without externally specified embedding levels from
styledtext and computes the left-right-directionality of each character.If the entire paragraph consists of text of only one direction, then the function may not perform all the steps described by the algorithm, i.e., some levels may not be the same as if all steps were performed. This is not relevant for unidirectional text.
For example, in pure LTR text with numbers the numbers would get a resolved level of 2 higher than the surrounding text according to the algorithm. This implementation may set all resolved levels to the same value in such a case.The text must be externally split into separate paragraphs (rule P1). Paragraph separators (B) should appear at most at the very end.
UBiDi object allocated with ubidi_open()
which will be set to contain the reordering information,
especially the resolved levels for all the characters in text.
length long.
length==-1 then
the text must be zero-terminated.
paraLevel can be set to
either UBIDI_DEFAULT_LTR
or UBIDI_DEFAULT_RTL;
if there is no strongly typed character, then
the desired default is used (0 for LTR or 1 for RTL).
Any other value between 0 and UBIDI_MAX_EXPLICIT_LEVEL is also valid,
with odd levels indicating RTL.
UBIDI_LEVEL_OVERRIDE bit set.
Except for that bit, it must be
paraLevel<=embeddingLevels[]<=UBIDI_MAX_EXPLICIT_LEVEL.
Caution: A copy of this pointer, not of the levels,
will be stored in the UBiDi object;
the embeddingLevels array must not be
deallocated before the UBiDi structure is destroyed or reused,
and the embeddingLevels
should not be modified to avoid unexpected results on subsequent BiDi operations.
However, the ubidi_setPara() and
ubidi_setLine() functions may modify some or all of the levels.
After the UBiDi object is reused or destroyed, the caller
must take care of the deallocation of the embeddingLevels array.
The embeddingLevels array must be
at least length long.
pErrorCode - must be a valid pointer to an error code value,
which must not indicate a failure before the function call.
alphabetic index hierarchy of classes
this page has been generated automatically by doc++
(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de