Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Google can search backwards (google.com)
115 points by blago on Nov 28, 2011 | hide | past | favorite | 24 comments


This is a trick with Unicode RTL. The search query in the URL contains the character U+202E RIGHT-TO-LEFT OVERRIDE, followed by the searched-for text in normal (nonreversed) order.

Apparently Google ignores this character when searching for matches (so the matches are displayed normally), but the character appears when the query is reproduced in the search box at top of the screen, so the search string appears backwards.


This character is interesting, one more thing to watch out for in user-provided input. You do your homework and escape HTML in users' comments but if you don't escape the RTL overrides, their effects can "bleed" to other parts of the page, rendering it unreadable or at least hard to read.


The bleeding over seems to apply to Google's title. In my browser, it shows up as "xoferiF allizoM - hcraeS elgooG"...


Unicode Bidirectional Algorithm: http://www.unicode.org/reports/tr9/


Interesting character. You can copy & paste it in front of any text in an editable field and the text immediately flips.


Not only that, but the entire directionality of the text box does to. E.g. arrowing right and left is flipped as well.


Bingo. I wish I had a price for you.


s/price/prize/



But did you guys know you can search a height of a celebrity?

https://www.google.com/search?sourceid=chrome&ie=UTF-8&#...

https://www.google.com/search?sourceid=chrome&ie=UTF-8&#...

Try some other celebrity



However, it seems to show its results only in inches and feet though.


But curiously the height for Bill Gates is given in meters.


Not only that, Google also does keyboard-layout mapping if you forgot to switch your keyboard layout before searching.

For example, if I want to search in Hebrew for "חיפוש בעברית" but accidentally typed in English and typed "jhpua gchcr," (same keys as the Hebrew chars) - I'll still get the results I was looking for [1].

[1] - https://www.google.com/search?q=jhpua%20cgcrh,


If I remember correctly from one talk, it does this by remembering how users correct themselves.


In the case of Hebrew, I doubt they go to such lengths. ןא ןד הקרט קשדט אם בםמהקרא דןמבק פרקאאט צוביקהקרטםמק ודקד איק דשצק לקטנםשרגץ

(Google the hebrew text to decode to English. :-) )


The answer is 24.


they might have just index that phrase backwards. if you were to search for "hacker news" backwards, you get nothing related. http://www.google.com/search?gcx=w&sourceid=chrome&i...



Interesting that you can do this if you put all those url parameters in. But the default google search won't get you these backwards results. if you go to google.com and enter "swen rekcah", you won't get these results.

Also, the url contains &q=%E2%80%AEhacker%20news& which is not hacker news backwards.


so can bing, yahoo and every other search engine.


looc s'taht llew


when I searched that, Google is showing results for "loc state law". :-)


This is cool! So Google is Wolfram Alpha for everything in the world?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: