9

I'd like to use the "right-to-left override" (unicode character 202E) in Safari. How do I make it work?

7

If all you want is to make it work in Safari:

This is left to right, &#8238;but this is right to left,<br />
and then this is back to left to right again.

results in:

This is left to right, ‮but this is right to left,
and then this is back to left to right again.

The important bit is the &#8238;—everything after that will be reversed.

Note: this assumes that the web page is using UTF-8 (and if it isn't, it should be).

5
  • Yeah, but it won't work in SE chat and comments.
    – nyuszika7h
    Feb 2 '11 at 12:43
  • @Nyuszika do you really want to type inverted here? ;) Feb 2 '11 at 14:28
  • 1
    ‮Yeah, probably. :)
    – nyuszika7h
    Feb 2 '11 at 14:34
  • How would I make it work elsewhere?
    – Moshe
    Feb 2 '11 at 15:14
  • @Moshe - where else do you want it? It should work in other browsers as well, and pretty much anywhere that can handle that type of HTML entity. FWIW, there's no real difference between document.getElementById("bkwd").innerHTML="\u202e backwards"; and document.getElementById("bkwd").innerHTML="&#8238; backwards";—it's just that the latter can also be typed directly into the text of an HTML page.
    – Dori
    Feb 3 '11 at 0:29
7

Open up the Web Inspector with Command+Shift+I and type in this:

copy('\u202e');

If this won't throw an error, the right-to-left override is copied to your clipboard. You can try it even in the console, just press Command+V and then type some text.

This works cross-platform (just be sure to use Ctrl in Windows), in all WebKit browsers, but only inside the console.


Update: I've just installed Safari 5 on Win7 x64, and it seems that the character is copied to the clipboard, but Safari can't handle it. The HTML entity that Dori suggested will work in any HTML document. There, it will work in questions and answers, but not in chat and comments.

5
  • Don't know why... This didn't work.
    – Moshe
    Feb 1 '11 at 21:58
  • Safari won't let me type it in chat. I wonderif it would work inasking a question?
    – Moshe
    Feb 2 '11 at 15:13
  • I've already said that the HTML entity won't work in chat and comments. Yes, it works in questions and answers.
    – nyuszika7h
    Feb 2 '11 at 15:16
  • The strange thing is that it renders the backwards chat and comments.
    – Moshe
    Feb 2 '11 at 15:26
  • You need to copy that character from somewhere else. I'm using Chrome, and what I've said works fine for me.
    – nyuszika7h
    Feb 2 '11 at 15:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .