Hacker News new | ask | show | jobs
by mattpallissard 564 days ago
> For extra credit, you can try to figure out what's going on here:

I've spent a few minutes staring at this section and still haven't figured it out. Anyone smarter than I care to shed some light?

4 comments

My best guess would be: selecting with the mouse from the left until the (first two?) arabic characters, then extending the selection using the right arrow key while holding shift. Might be that the arrow key skips the cursor to the right side before extending the selection.
I'd bet on “llo” + the right part of the arabic word having been selected with the mouse, then the selection having been extended with the right arrow to encompass the “he”.
It's also possible the "He" from the second "Hello" is RTL (part of the same RTL block as the rest of the Arabic text).
Array indexing from RTL and LTR when both are together? Noted it's off-by-one though.