From: shibata.hiroshi@... Date: 2014-02-09T04:45:06+00:00 Subject: [ruby-core:60611] [ruby-trunk - Bug #9094] [Third Party's Issue] Curses.getch() function responds twice for unicode keys Issue #9094 has been updated by Hiroshi SHIBATA. Status changed from Open to Third Party's Issue curses is extracted from ruby-core. If you still have this issue, Please report to https://github.com/ruby/curses ---------------------------------------- Bug #9094: Curses.getch() function responds twice for unicode keys https://bugs.ruby-lang.org/issues/9094#change-45051 * Author: Johan Walles * Status: Third Party's Issue * Priority: Normal * Assignee: * Category: * Target version: * ruby -v: ruby 2.1.0dev (2013-10-30 trunk 43476) [x86_64-darwin13.0.0] * Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN ---------------------------------------- Try this: 1. Write a curses program (or use the attached one). 2. Call Curses.getch() 3. Press "��" on your keyboard (Swedish layout needed for this) Current result: I get *two* separate results from Curses.getch(), which when merged form a unicode '��'; 195 and 164. Expected result: I expected *one* result from Curses.getch() for my single keypress, containing a unicode '��'. Notes: It seems as if Curses.getch() ends up in the NCurses getch() function at http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ext/curses/curses.c?revision=43316&view=markup#l647 . Calling wgetch() instead may or may not help. ---Files-------------------------------- ruby-curses-getch.rb (293 Bytes) -- http://bugs.ruby-lang.org/