by Michael S. Kaplan, published on 2012/10/09 07:01 -04:00, original URI: http://blogs.msdn.com/b/michkap/archive/2012/10/09/10357645.aspx
Back in 2006, I put my extreme example string in the blog More on cursor support: the rest of the answer.
Many people, even native speakers of bidirectional languages and scripts who do not really know about Unicode or the UBA, find it to be confusing.
Now those native speakers of bidirectional languages and scripts who do know a bit about what is going on here? Even they can have trouble editing bidirectional text. This extreme case is showing off how complicated things can be.
This confusion that everyone can have to some degree is the main reason that people can often find the visual option in Word to be interesting:
Kind of ironic that the Cursor Movement options are Logical and Visual.
I mean, the Visual option is well-named -- it is WYSIWYG (What You See Is What You Get), and bring the cursor along for the ride!
But if editing in Word confuses both new users and old users (in different ways) to some extent, then calling it :Logical is kind of silly.
Thus my suggestion for Word and for everyone -- the setting should be
Illogical
vs.
Visual
right?
Of course, it currently is the default option in Word, which would put them in the awkward position of calling their default illogical.
So that may not be such a good option for them.
I mean, its one thing to be illogical by default, but it is quite another to say it in your dialog!
Now it isn't fair to blame Unicode or the Unicode Bidi Algorithm (UAX #9), since it doesn't refer to cursor movement or text selection issues at all.
The whole "Logical" vs. "Visual" thing does come from there, because from the point of view of the Unicode Standard, it makes sense to call the text in the backing store logical.
Whether the default option in Word or the only option most other places should follow that direction, and extend it to cursor movement and text selection is a hard one.
So hard that they encourage so many implementations to do it in a way that confuses people!
Perhaps they should take up this issue and talk about it. You know, have the Unicode Standard weigh in.
Now that I think would be logical.
John Cowan on 9 Oct 2012 7:50 AM:
I think it should be called "phonological order", or some less technical equivalent like "spoken order".
Random832 on 9 Oct 2012 9:28 AM:
With visual movement, if you've got the string "abcdאבגדabcd", and the cursor is on the left side of the RTL substring, is it "before" or "after" it? What if it's on the right side? And either case, the visual location where typed text will actually be inserted depends on both the logical cursor position _and_ the direction of the new typed text. (Chrome, which exhibits visual cursor movement behavior and presumably has its own implementation of such, seems to get confused and blank out parts of the line if I attempt to insert or erase RTL characters on or near the boundary in certain situations) Granted, without a split insertion point, there is still an ambiguity of where to display the cursor in each case, but at least you're starting with a well-defined idea of where the cursor "actually is" in the character stream.
With visual mode, am I expected to be able to position my cursor at the left side of the embedded RTL substring, and typing "ה" will append it after (abcdאבגדה), but typing "e" will insert it before (abcdeאבגד)? If I type into a blank area "abcdאבגד", where will the cursor be, and what happens if the next thing I type is "abcd"?
Maybe the solution is to support a "logical display mode" that only goes in one direction (pick one. maybe have it be boustrophedon with a randomly selected starting direction), and everyone can just sdrawckab daer ot nrael.
Alex Cohn on 9 Oct 2012 9:54 AM:
This may be also called EDITING order. Fwiw we all expect the backspace key to change its direction following the context. Or callit EDITCONTROL order, because this is how the cursor moves in response to left and right arrow keys in the system edit box. But maybe really soon the touch screen will make this whole discussion archaeological.
Doug Ewell on 9 Oct 2012 10:11 AM:
"Logical" does not necessarily mean "intuitive."
Random832 on 9 Oct 2012 10:26 AM:
(I tried posting this earlier, but I think I took too long writing it and it didn't go through)
With visual movement, if you've got the string "abcdאבגדabcd", and the cursor is on the left side of the RTL substring, is it "before" or "after" it? What if it's on the right side? And either case, the visual location where typed text will actually be inserted depends on both the logical cursor position _and_ the direction of the new typed text. (Chrome, which exhibits visual cursor movement behavior and presumably has its own implementation of such, seems to get confused and blank out parts of the line if I attempt to insert or erase RTL characters on or near the boundary in certain situations) Granted, without a split insertion point, there is still an ambiguity of where to display the cursor in each case, but at least you're starting with a well-defined idea of where the cursor "actually is" in the character stream.
With visual mode, am I expected to be able to position my cursor at the left side of the embedded RTL substring, and typing "ה" will append it after (abcdאבגדה), but typing "e" will insert it before (abcdeאבגד)? If I type into a blank area "abcdאבגד", where will the cursor be, and what happens if the next thing I type is "abcd"?
Maybe the solution is to support a "logical display mode" that only goes in one direction (pick one. maybe have it be boustrophedon with a randomly selected starting direction), and everyone can just sdrawckab daer ot nrael.
Azarien on 10 Oct 2012 2:30 AM:
I wonder what happens, when you make a text selection that begins in the middle of text of one direction, but ends in the middle of other direction?
If text selection is also made in "visual" way, the text (when copy-pasted) will be non-contiguous, but with "illogical" selection, the selection must be visually non-contiguous.
Which one actually happens if you enable visual cursor movement?
Random832 on 10 Oct 2012 5:33 AM:
@Azarien That depends on what you mean by "will be non-contiguous". If you have the string "abcdאבגדabcd", and you copy "cdגד" from the middle, I could imagine that some people might consider that the most sensible thing in the world even though you've just done the equivalent of going from "abcdABCDabcd" to "cdCD".
You could simply ban selections from beginning or ending in an embedded opposite-direction run. If you start in one, and go out of it, it selects the whole thing the same as when Word makes you select the whole word you started in the middle of (which you can override, yes, by backtracking back into the original word with the mouse - you could allow the same thing for the user to force an "illogical" selection.)