70

Here's a website I found that will produce upside down versions of any English text.

how does it work? does unicode have upside down chars? Or what?

How can I write my own text flipping function?

hippietrail
  • 15,848
  • 18
  • 99
  • 158
flybywire
  • 261,858
  • 191
  • 397
  • 503
  • 3
    They just collected from various unicode ranges, IMHO. – YOU Jun 08 '10 at 07:06
  • 50
    Use the source, Luke... – Pontus Gagge Jun 08 '10 at 07:06
  • 5
    check out http://www.fileformat.info/convert/text/upside-down-map.htm – Nick Dandoulakis Jun 08 '10 at 07:09
  • 3
    Interestingly, the upside-down-text website did not implement the reverse transformation: if you feed its output back into the site, you do not necessarily get your original input back. – pnkfelix Feb 17 '13 at 03:55
  • Interesting, however, what practical use do upside down characters have? – Joe R. Jul 09 '13 at 07:36
  • I've written an Emacs Lisp library, [upside-down.el](https://github.com/aaron-em/upside-down.el), which implements this transformation. Even if you don't use Emacs, you might still find the code useful for the inversion mapping it defines; I've improved considerably, I think, on what the fileformat.info mapping offers, and also implemented mine such that the transformation reverses itself cleanly. Check it out! – Aaron Miller Dec 26 '13 at 11:12
  • 1
    Z⅄XꤵꓥꓵꓕSꓤÒꓒONꟽ⅂ꓘᒋIΗ⅁ℲƎꓷↃꓭꓯzʎxʍʌnʇsɹbdouɯןʞſ̣ᴉɥɓɟǝpɔqɐ068᠘9૬ҺƐᘔl¡¿؛˙‘‚„⅋ This set has some better or more consistent-looking captial letters (esp ABDJMQRUVW) and numbers (esp. 2457) than I've seen out there, and note the lower case i and j are dotted and the g tails the right way. The i is one character, but the j is a composite that uses a dot-under diacritcal mark from unicode. – ylekod Aug 03 '18 at 01:44

7 Answers7

57

how does it work? does unicode have upside down chars?

Unicode does have upside-down characters. They have "TURNED" in their name:

ƍ U+018D LATIN SMALL LETTER TURNED DELTA
Ɯ U+019C LATIN CAPITAL LETTER TURNED M
ǝ U+01DD LATIN SMALL LETTER TURNED E
Ʌ U+0245 LATIN CAPITAL LETTER TURNED V
ɐ U+0250 LATIN SMALL LETTER TURNED A
ɒ U+0252 LATIN SMALL LETTER TURNED ALPHA
ɥ U+0265 LATIN SMALL LETTER TURNED H
ɯ U+026F LATIN SMALL LETTER TURNED M
ɰ U+0270 LATIN SMALL LETTER TURNED M WITH LONG LEG
ɹ U+0279 LATIN SMALL LETTER TURNED R
ɺ U+027A LATIN SMALL LETTER TURNED R WITH LONG LEG
ɻ U+027B LATIN SMALL LETTER TURNED R WITH HOOK
ʇ U+0287 LATIN SMALL LETTER TURNED T
ʌ U+028C LATIN SMALL LETTER TURNED V
ʍ U+028D LATIN SMALL LETTER TURNED W
ʎ U+028E LATIN SMALL LETTER TURNED Y
ʞ U+029E LATIN SMALL LETTER TURNED K
ʮ U+02AE LATIN SMALL LETTER TURNED H WITH FISHHOOK
ʯ U+02AF LATIN SMALL LETTER TURNED H WITH FISHHOOK AND TAIL
ʴ U+02B4 MODIFIER LETTER SMALL TURNED R
ʵ U+02B5 MODIFIER LETTER SMALL TURNED R WITH HOOK
ʻ U+02BB MODIFIER LETTER TURNED COMMA
̒ U+0312 COMBINING TURNED COMMA ABOVE
ჹ U+10F9 GEORGIAN LETTER TURNED GAN
ᴂ U+1D02 LATIN SMALL LETTER TURNED AE
ᴈ U+1D08 LATIN SMALL LETTER TURNED OPEN E
ᴉ U+1D09 LATIN SMALL LETTER TURNED I
ᴔ U+1D14 LATIN SMALL LETTER TURNED OE
ᴚ U+1D1A LATIN LETTER SMALL CAPITAL TURNED R
ᴟ U+1D1F LATIN SMALL LETTER SIDEWAYS TURNED M
ᵄ U+1D44 MODIFIER LETTER SMALL TURNED A
ᵆ U+1D46 MODIFIER LETTER SMALL TURNED AE
ᵌ U+1D4C MODIFIER LETTER SMALL TURNED OPEN E
ᵎ U+1D4E MODIFIER LETTER SMALL TURNED I
ᵚ U+1D5A MODIFIER LETTER SMALL TURNED M
ᵷ U+1D77 LATIN SMALL LETTER TURNED G
ᶛ U+1D9B MODIFIER LETTER SMALL TURNED ALPHA
ᶣ U+1DA3 MODIFIER LETTER SMALL TURNED H
ᶭ U+1DAD MODIFIER LETTER SMALL TURNED M WITH LONG LEG
ᶺ U+1DBA MODIFIER LETTER SMALL TURNED V
℩ U+2129 TURNED GREEK SMALL LETTER IOTA
Ⅎ U+2132 TURNED CAPITAL F
⅁ U+2141 TURNED SANS-SERIF CAPITAL G
⅂ U+2142 TURNED SANS-SERIF CAPITAL L
⅄ U+2144 TURNED SANS-SERIF CAPITAL Y
⅋ U+214B TURNED AMPERSAND
ⅎ U+214E TURNED SMALL F
⌙ U+2319 TURNED NOT SIGN
❛ U+275B HEAVY SINGLE TURNED COMMA QUOTATION MARK ORNAMENT
❝ U+275D HEAVY DOUBLE TURNED COMMA QUOTATION MARK ORNAMENT
⦢ U+29A2 TURNED ANGLE
Ɐ U+2C6F LATIN CAPITAL LETTER TURNED A
ⱹ U+2C79 LATIN SMALL LETTER TURNED R WITH TAIL
ⱻ U+2C7B LATIN LETTER SMALL CAPITAL TURNED E
Ꝿ U+A77E LATIN CAPITAL LETTER TURNED INSULAR G
ꝿ U+A77F LATIN SMALL LETTER TURNED INSULAR G
Ꞁ U+A780 LATIN CAPITAL LETTER TURNED L
ꞁ U+A781 LATIN SMALL LETTER TURNED L

However, it's far from a complete set. Most upside-down text works by choosing characters that happen to have a close-enough resemblance to upside-down letters. It's the equivalent of typing 0.7734 on your calculator to spell "hELLO".

dan04
  • 87,747
  • 23
  • 163
  • 198
32

does unicode have upside down chars?

Yup! Or at least characters that look like they are upside down. Also, regular English-alphabetical characters can appear to be upside down. Like u could be an upside-down n.

To code it up, you just have to take an array of characters, display them in reverse order and replace those characters with the upside down version of them. This will get you a good start: zʎxʍʌnʇsɹbdouɯןʞſıɥbɟǝpɔqɐ

theonlygusti
  • 11,032
  • 11
  • 64
  • 119
31

When 'uʍop-ǝpısdn' is copied and echoed into a hex dump program, the string is seen as:

75 CA 8D 6F 70 2D C7 9D 70 C4 B1 73 64 6E

The UTF-8 breakdown of that is:

0x75      = U+0075 = LATIN SMALL LETTER U
0xCA 0x8D = U+028D = LATIN SMALL LETTER TURNED W
0x6F      = U+006F = LATIN SMALL LETTER O
0x70      = U+0070 = LATIN SMALL LETTER P
0x2D      = U+002D = HYPHEN MINUS
0xC7 0x9D = U+01DD = LATIN SMALL LETTER TURNED E
0x70      = U+0070 = LATIN SMALL LETTER P
0xC4 0xB1 = U+0131 = LATIN SMALL LETTER DOTLESS I
0x73      = U+0073 = LATIN SMALL LETTER S
0x64      = U+0064 = LATIN SMALL LETTER D
0x6E      = U+006E = LATIN SMALL LETTER N
Jonathan Leffler
  • 730,956
  • 141
  • 904
  • 1,278
  • 1
    But why are they in the unicode standard in the first place? What are they actually *for*? – Migwell Mar 28 '19 at 10:01
  • 1
    Showing turned text, presumably. – Matthew Read Dec 04 '20 at 06:41
  • 1
    @Migwell upside down letters are used extensively in IPA and many missionary scripts is inspired by latin script and devise new letters turning latin letters upside down. The rest of then is a chance reseblance – Xwtek Jan 11 '21 at 09:19
8

They are just unicode characters.

enter image description here

animuson
  • 53,861
  • 28
  • 137
  • 147
Igor Zevaka
  • 74,528
  • 26
  • 112
  • 128
5

Look at source of web page:

function flip() {
    var result = flipString(document.f.original.value);
    document.f.flipped.value = result;
}

function flipString(aString) {
    aString = aString.toLowerCase();
    var last = aString.length - 1;
    var result = "";
    for (var i = last; i >= 0; --i) {
        result += flipChar(aString.charAt(i))
    }
    return result;
}

function flipChar(c) {
    if (c == 'a') {
        return '\u0250'
    }
    else if (c == 'b') {
        return 'q'
    }
    else if (c == 'c') {
        return '\u0254' //Open o -- copied from pne
renegm
  • 610
  • 2
  • 5
  • 12
0

There is the ”upsidedown” python module. https://pypi.org/project/upsidedown/. And it supports non-english characters too.

jacek
  • 51
  • 1
  • 2
0

There are Unicode characters that look similar to normal letters and are inverted, For instance: B's inverted version can be "ᗺ" which is a Canadian Syllabics Carrier Kha Character (U+15FA), this website https://www.upsidedowntext.top/ has a list of all inverted Unicode characters it uses to generate Upside down text.

usaidr
  • 1
  • 1