drracket
drracket copied to clipboard
Unicode Acents in DrRacket
In DrRacket (in Windows) this program prints "eé" instead of "ée". (The acent is in the wrong e.)
#lang racket
"e\u0301e"
Otherwise this HTML shows: ée
<html>
<head><title></title></head>
<body>ée</body>
</html>
FWIW on OS X I see: e ́ e
/Jens Axel
FWIW on linux I see: e<dotted circle>é
with the accent over the second e
, but the accent "belongs" to the dotted circle character (i.e. if I copy-paste the first e
character, it copies e
, if I copy-paste the dotted circle character it copies U+0301 and if I copy-paste the third é
character, it just copies e
).
If I copy-paste the whole string into GNU Charmap (a GTK application), I get ée
as expected.
@gus-massa: What system are you running?
I see that running this program:
#lang racket/gui
(define t (new text%))
(define f (new frame% [label ""] [width 400] [height 400]))
(define ec (new editor-canvas% [parent f] [editor t]))
(send t insert "e\u0301e")
(send f show #t)
produces a window with the expected result, namely two "e"s with an accent on the first one.
I also see that when running the program "e\u0301e"
and copying and pasting that string one is offered the choice to normalize the string or not. Normalizing it produces the desired result and leaving it alone produces two "e"s with the accent between them, as @soegaard saw. Leaving those two together, next to each other, produces output that looks reasonable when rendered at the bottom of the DrRacket window in an error message, but not when run and rendered in the interactions window, as shown in the screenshot.
I'm not sure what all this means, as far as what change would be reasonable to make.....
![Screen Shot 2021-01-01 at 12 25 20 PM](https://user-images.githubusercontent.com/399024/103444292-cd34e580-4c2c-11eb-96a6-8b7dd1287189.png)