[racket-dev] weirdest bug ever
Hello,
try the following in the interaction panel of DrRacket:
(display (integer->char #x2144))
Or, just put this character in an editor buffer.
The character is displayed 3 lines below its proper position.
AFAIK, this character is a normal ‘Letterlike Symbol’. It shouldn't
have any misterious formatting properties, and it's a character of
fundamental importance for writing ¡uʍop ǝpısdn 8^)
(latest nightly build, on windows 8)
Puzzled P.
========
#lang racket
(provide upside-down)
(define table
(let ()
(define (putin t s1 s2)
(for/fold ((t t))
((c1 (in-string s1))
(c2 (in-string s2)))
(hash-set t c1 c2)))
(for/fold ((t (hash)))
((pair (in-list '(("abcdefghijklmnopqrstuvwxyz?!’._()[]{}<>;"
"ɐqɔpǝɟƃɥıɾʞןɯuodbɹsʇnʌʍxʎz¿¡,˙‾)(][}{><؛")
("ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"∀qƆpƎℲפHIſʞ˥WNOԀQɹS┴∩ΛMX⅄Z")
))))
(putin t (first pair) (second pair)))))
(define (upside-down string)
(list->string
(reverse
(for/list ((c (in-string string)))
(hash-ref table c c)))))
========