More on cursor support: half of the answer!
by Michael S. Kaplan, published on 2006/01/09 11:31 -08:00, original URI: http://blogs.msdn.com/michkap/archive/2006/01/09/510892.aspx
Ok, earlier today in the post More on cursor support: in Bidi, intuition can be a four letter word, I posted a problem. I have gotten some offline email and some guesses that gave as many as three non- contiguous selection areas, but no one who has yet come up with the solution....
So, to keep people looking and thinking, here is the string that allows for the five non-contiguous areas of selection in Notepad:
אבג123אבגABCאבג123אבג
Now you just have to figure how to get the non-contiguous selections to happen in Notepad!
You can post answers if you want (I have marked this post to moderate all comments, so you won't spoil it for anyone by guessing there).
Good luck! :-)
# Maurits on Monday, January 09, 2006 2:54 PM:
Doesn't work at all in Notepad for me (Windows 2000) but in Firefox I can get five "nonconsecutive" selections by starting between the first "12" pair and finishing between the second "12" pair
# Maurits on Monday, January 09, 2006 2:56 PM:
Guess my "signed-in" status broke the moderation?
# Michael S. Kaplan on Monday, January 09, 2006 3:40 PM:
Maybe no one else saw it. :-)
# Alex on Monday, January 09, 2006 3:47 PM:
select 2 to 2
# sadfsdaf on Monday, January 09, 2006 4:03 PM:
not just notepad, but ie and firefox both render 5 non-contiguous selection areas if do the backwards then forwards far enough trick
# Andy Den Tandt on Monday, January 09, 2006 4:09 PM:
Cewl: that's why I read this blog: I'm interested in internationalization, but I still have a lot to learn about the how & why.
So why do you get the weird cursor movements? E.g. move cursor between the visually leftmost 1 and 2, hold shift and press the right-arrow 13 times and you get the 5 nonconsecutive selection highlights.
# Ben Bryant on Monday, January 09, 2006 4:24 PM:
Ummm, click in the middle of either of the 123's and drag to the middle of the other 123? Or do I not get the question? It works in the Explorer too with your text right there. I also found that on a machine where I have not installed extra language support it works in Explorer but not in Notepad.
# Michael on Monday, January 09, 2006 4:27 PM:
In IE, selecting the text from the first '2' to the last '2' does it.
# Mihai on Monday, January 09, 2006 4:42 PM:
Start between the first 1 and 2.
Shift-right arrow 12 (or 13) times.
But it does not work if Notepad is set to use RTL reading order :-)
# Doug on Monday, January 09, 2006 7:53 PM:
I had three noncontiguous areas with only LTR and RTL characters (and you can't get more than that I believe), but I didn't realise that numbers were Bidi neutral. I've got it now, though :). Trying to select part of that text with the mouse to copy and paste it into Notepad really messes with your head!
On another note, it's an odd feeling for the right arrow key to move left through RTL characters, but it makes sense. Does this happen even in localised versions of Windows? In that case, if computers were first developed by people who wrote RTL, could we expect the left arrow to go right through English text?
# Mike on Tuesday, January 10, 2006 1:19 AM:
Start dragging to the right after the first 1 (before the first 2) and stop dragging after the second 1 or 2.
# Michael S. Kaplan on Tuesday, January 10, 2006 1:38 AM:
Funny how much more willing people are to post publoicly when they think they know the answer rather than when they are guessing like in the first post, huh? :-)
Mihai raised a fun question -- how would you construct the analagous string for when it is in RTL reading order?
Tomorrow I will talk about the Bidi issues behind the example and other related issues...
# Shoshannah Forbes on Tuesday, January 10, 2006 1:56 AM:
Interesting. I'm a native Hebrew speaker, so finding the way to get 4 was easy. 5? I actaully got it first but miscounted :-)
Here it is (using Firefox on Linux- I still need to a Windows box to test on Notepad):
http://img2.imgspot.com/?u=/u/06/9/02/4select.png
# Mihai on Tuesday, January 10, 2006 1:31 PM:
"Funny how much more willing people are to post publoicly when they think they know the answer"
Keep quiet. This was my secret: "answer when you know, shut up when you don't, and you will look like an expert" :-)
# Vorn on Tuesday, January 10, 2006 8:46 PM:
Safari misrenders the string: it produces aleph-one-aleph-A-aleph-aleph-one.
Vorn
Please consider a
donation to keep this archive running, maintained and free of advertising.
Donate €20 or more to receive an offline copy of the whole archive including all images.
referenced by
go to newer or older post, or back to index or month or day