S
Shawn Whoo
I am an elementary user of ruby,i meet a problem about ruby curses.
source code as follow:
require "curses"
include Curses
init_screen
begin
crmode
echo
ch = getstr #problem occurred here
noecho
ensure
close_screen
end
I input some 2-byte-word (like chinese word) from the keyboard,but the
screen do not show the right result, finally I find that :
1) I input only one 2-byte-word from the keyboard , the screen show me
the first byte of the word but abandon the another byte of the word .
2) I input two 2-byte-words from the keyboard, the second byte of each
of the two 2-byte-words was abandoned, and the screen show me the result
that it recompose a 2-byte-word by the first byte of each of the two
2-byte-words
source code as follow:
require "curses"
include Curses
init_screen
begin
crmode
echo
ch = getstr #problem occurred here
noecho
ensure
close_screen
end
I input some 2-byte-word (like chinese word) from the keyboard,but the
screen do not show the right result, finally I find that :
1) I input only one 2-byte-word from the keyboard , the screen show me
the first byte of the word but abandon the another byte of the word .
2) I input two 2-byte-words from the keyboard, the second byte of each
of the two 2-byte-words was abandoned, and the screen show me the result
that it recompose a 2-byte-word by the first byte of each of the two
2-byte-words