Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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

share|improve this question

2 Answers 2

up vote 3 down vote accepted

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).

share|improve this answer
    
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? ;) –  Martín Marconcini Feb 2 '11 at 14:28
    
‮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

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.

share|improve this answer
    
THIS IS AMAZING!!!!!! –  Josh Feb 1 '11 at 21:40
    
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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.