User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Ruby section within the Web Development category of DaniWeb, a massive community of 397,588 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,997 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Ruby advertiser: SELL YOUR PRODUCT TODAY !
Views: 2249 | Replies: 0
Reply
Join Date: Oct 2007
Posts: 1
Reputation: shawn_2008 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
shawn_2008 shawn_2008 is offline Offline
Newbie Poster

Help ruby curses

  #1  
Oct 4th, 2007
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

I know it sounds like ruby curses do not support unicode, but I can call addstr to show chinese word, I really do not know
what the problem is, so I come for some help to solve the problem, thank you for your advice.
AddThis Social Bookmark Button
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Ruby Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the Ruby Forum

All times are GMT -4. The time now is 5:49 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC