Bidirectional Text in a Text-Editing Environment

Bidirectional text poses a few challenging problems for text-editing applications. Consider our earlier example:

This is represented in memory as follows:

U+0041 LATIN CAPITAL LETTER A
U+0042 LATIN CAPITAL LETTER B
U+0043 LATIN CAPITAL LETTER C
U+05D0 HEBREW LETTER ALEF
U+05D1 HEBREW LETTER BET
U+05D2 HEBREW LETTER GIMEL

Let's say you click to place the insertion point here:

This position is ambiguous. It can be between the letter C and the letter , or it can be at the end of the string, after the ...

Get Unicode Demystified now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.