Thursday, August 16, 2007

Fun with UNICODE and Mirroring Character

What is UNICODE?


Everything you see on your computer is represented by 0's and 1's. Characters are also encoded in the form of 0's and 1's. In this method each character is represented by a number. A common method of encoding is called ASCII (American Standard for Information Interchange). In this method each character is represented by 8 bits. Therefore 256 different characters can be represented using this method. But 256 characters is not enough to mention all characters in all languages. Here comes UNICODE, in which each character is represented by 16 bits. Therefore in this method of encoding, 65536 characters can be represented.
For more information about UNICODE and its applictions visit Unicode.org


Whats interesting?


Unicode is capable of representing many languages, including those written from left to right and those written from right to left. There are special characters in UNICODE to achieve the RTL. One such character is the Mirroring character. The property of mirroring character is that it makes Left to Right Text, Right to Left just by pasting the character, all text after it becomes RTL. So it can be used on sites which use UNICODE character encoding format (like orkut). The property of the mirroring character is that it reverses whatever you paste after it. So "[mirror char]hello, how are you?" becomes "?ouy era woh ,olleh".
Mirror character has nothing to display, so you cant see a mirror character.
One thing to note that is the mirroring character is not rendered on all browsers. It is supported on Firefox, Opera, IE7 (partially). If anyone has any info about other browsers please leave a comment.
Effect of using a mirroring character on orkut with the profile name is shown below:

Note that the word "scrapbook" is inversed. There is more of it left for you to explore and find out ...
Mirroring character also works on some Instant Messengers like Google Talk and Yahoo! Messenger, on which you can send reversed sentences very easily, making a feeling that you can type reversed.


See for yourself


If your are using a browser such as Firefox which renders the unicode mirroring character the following text(in the gray box) will appear reversed:

‮‮The unicode mirroring character was used to
reverse this text. If it still appears normal
then, your browser does not render mirroring
character or worse do not support UNICODE!
If you are seeing this normally then there
is no point in continuing. Get a browser like firefox that
supports unicode.


The unicode mirroring character was used to
reverse this text. If it still appears normal
then, your browser does not render mirroring
character or worse do not support UNICODE!
If you are seeing this normally then there
is no point in continuing. Get a browser like firefox that
supports unicode.



Want the mirroring character?


The mirroring character cannot be seen and I couldnot find the HEX or Numeric Code. If anyone has found out leave a comment.
The mirroring character is within these braces

(‮‮(


Inorder to get the mirroring character, try copying the content between the braces and paste it somewhere to see the magic! ...

What can it be used for?


‮‮http://www.mysite.com/fol/file.html?site/moc.elgoog.www://ptth

Suppose you paste a link like this and if someone clicks he/she goes to mysite.com instead of google.com. This could be used on sites like orkut.com which doesn't allow you to hide the url of the link you are giving.
So it could be potentially used for phishing !Inorder to protect yourself from such methods always look at the url beofre you give away senstitive information about yourself.
Other potential uses are left for you to explore. If you find anything interesting please let me know..

Guess you can take care of it from here on ...
Thats all folks.

Thanks to
Vineeth Mohan for giving me the mirroring character.

Caution!
This trick can potentially be used for phishing! So please always look at the Address Bar for the URL of the page and verify it is the right site you want to visit! Please warn everyone you know about this risk.

No comments: