racket / drracket

DrRacket, IDE for Racket
http://www.racket-lang.org/
Other
445 stars 93 forks source link

DrRacket dies when I type ๐Ÿ‘€ with Japanese input #488

Closed plane closed 3 years ago

plane commented 3 years ago

Racket version Yesterday's snapshot build 8.1.0.6--2021-05-24(18a95c3/a) [cs]

Operating system Windows 10

Problem When I type ๐Ÿ‘€ into DrRacket using Japanese input, DrRacket stops responding, and a console window pops up with the following text:

integer->char: contract violation
  expected: valid-unicode-scalar-value?
  given: 55357
  context...:
   C:\Program Files\Racket-8.1.0.6\share\pkgs\gui-lib\mred\private\wx\win32\key.rkt:157:0: maybe-make-key-event
   C:\Program Files\Racket-8.1.0.6\share\pkgs\gui-lib\mred\private\wx\win32\window.rkt:611:2: do-key method in window%
   C:\Program Files\Racket-8.1.0.6\collects\ffi\unsafe\try-atomic.rkt:45:6
   C:\Program Files\Racket-8.1.0.6\collects\ffi\unsafe\try-atomic.rkt:30:0: call-as-nonatomic-retry-point
   C:\Program Files\Racket-8.1.0.6\share\pkgs\gui-lib\mred\private\wx\win32\queue.rkt:78:0: message-dequeue
   C:\Program Files\Racket-8.1.0.6\share\pkgs\gui-lib\mred\private\wx\common\queue.rkt:435:6
   C:\Program Files\Racket-8.1.0.6\share\pkgs\gui-lib\mred\private\wx\common\queue.rkt:486:32
   C:\Program Files\Racket-8.1.0.6\share\pkgs\gui-lib\mred\private\wx\common\queue.rkt:634:3

Additional info Interestingly, if I type ๐Ÿ‘€ in another window, and copy-and-paste it into DrRacket, it works properly.

Similar behavior occurs with other emojis like ๐Ÿ‘, but typing actual Japanese words rather than emojis (such as ใƒ†ใ‚นใƒˆ) works fine.

I am using the default Japanese input method in Windows 10 (the IME).