Sunday, March 14, 2010

Upside down writing with Unicode

Last week I was visiting a forum when I came across something strange: an upside down word.

The first thought that came to my mind is “my machine is infected”. Back in the day when I was still at the University, there were viruses that would play tricks with your text: flipping it upside down, making your sentences “rain down” (random letters start scrolling down until they disappear), showing a little ball bouncing and erasing text as it passed over it, all sort of tricks that the virus authors considered funny (of course it was rarely funny for the victim, as it typically implied losing several hours worth of work, on the other hand it was more innocent than today’s malware).

Then I looked more carefully. It was not a virus, I could select the text and paste it into notepad. Hmm, interesting. I started charmap.exe and looked for upside down letters. Sure enough there they were, letters like U+0279 Latin small letter turned r. Not all letters have turned versions but I did find enough, or I just found letters that looked sufficiently close to the reversed letter that I needed, even though semantically they were something else. For example U+0131, the small dotless latin i is a good choice for a turned i (incidentally, this is a letter that can create very interesting security bugs that are locale-dependent, but that is a story for some other time).

The next day I indulged myself in silly fun sending emails to my friends, uıʌəʞ and ןəɯɐʞ, signed as oıqəsnə

Read more: Gremlin In The Machine

Posted via email from jasper22's posterous