Text for Linux users who just happen to be standing on their heads

flipped rachelle meyer

Here’s one more really odd thing that you might consider doing when you’re finished setting up your 100+ new servers and troubleshooting problems that have stumped all the techies in the nearby vicinity – displaying text messages upside down. And if sheer entertainment is not enough of a reason, consider that the exercise might motivate you to think more deeply about the mysterious nature of character encoding systems. Yes, we’re going to turn phrases upside down -- not by flipping our monitors -- but by exchanging the usual characters that we see with their closest upside down equivalents – and then by presenting them on the screen in the reverse order.

First, an example of what you might see:

$ echo Hello, World! | ./flipme
¡p|ɹoʍ 'o||ǝɥ
$ echo hello there|flipme
ǝɹǝɥʇ o||ǝɥ
$ echo What on earth is that? | ./flipme
¿ʇɐɥʇ sı ɥʇɹɐǝ uo ʇɐɥʍ

Intrigued? Let’s take a look into what’s required to pull this off. First, that flipme reference that you see in the examples above is a Perl script that I found at this URL thanks to a reader who pointed me to it.


What it does is replace the characters in whatever string you provide with their “flipped” counterparts. Some of the characters are relatively easy. The letters n and u, for example, are already 180 degree siblings and some characters, like 0, don’t look any different if you flip them.

The characters are rotated, not mirror images of each other. The difference between mirror images and 180 degree rotations is illustrated in the figures below.

mirror vs rotate

The flipme script uses the characters in the normal character set that look like 180 degree rotations of other characters or it uses other characters in the utf8 character set that are close to the 180 degree rotations. The letters “d” and “p”, like “n” and “u” are naturals. The letter “e”, on the other hand, takes a little more effort. What we find is what I call a “schwa” (from many years ago as a speech therapist). A schwa is an unstressed vowel and is written as a rotated “e”.

"d" => "p",
"e" => "\x{01DD}",

Why does the utf8 character set include rotated letters? Well, technically it doesn’t. It includes a variety of international characters set and quite a number of them just happen to look like the Latin alphabet that have been rotated. Check out this page for a nice listing:


The script sets up a table to facilitate the conversions with entries such as these:

"P" => "\x{0500}",
"Q" => "\x{038C}",

It then flips the string that’s sent to it and then replaces each letter in the string with its rotated counterpart.

$ echo "I'm feeling a little dizzy. Think I need to go home now." | ./flipme
˙ʍou ǝɯoɥ oƃ oʇ pǝǝu ı ʞuıɥ⊥ ˙ʎzzıp ǝ|ʇʇı| ɐ ƃuı|ǝǝɟ ɯ,ı

As you'll note, some of the "flipped" characters only approximate a 180 degree rotation of the originals. And some look really good except for their placement which often makes them appear to float a little higher above the line than they should. The image below illustrates that the flipped characters are readable, though not precise rotations.


Of course, given adequate demand by Unix admins who want to work standing on their heads, someone would probably come up with a character set that flips letters even better. Until then, scripts like flipme will probably entertain us well enough.

This article is published as part of the IDG Contributor Network. Want to Join?

To express your thoughts on Computerworld content, visit Computerworld's Facebook page, LinkedIn page and Twitter stream.
Fix Windows 10 problems with these free Microsoft tools
Shop Tech Products at Amazon
Notice to our Readers
We're now using social media to take your comments and feedback. Learn more about this here.