drracket icon indicating copy to clipboard operation
drracket copied to clipboard

Unicode Acents in DrRacket

Open gus-massa opened this issue 8 years ago • 3 comments

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&#x301;e</body>
</html>

gus-massa avatar Mar 28 '16 15:03 gus-massa

FWIW on OS X I see: e ́ e

/Jens Axel

soegaard avatar Mar 28 '16 15:03 soegaard

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?

SuzanneSoy avatar Mar 31 '16 16:03 SuzanneSoy

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

rfindler avatar Jan 01 '21 18:01 rfindler