Forum: FXRuby can't input chinese in fox gui?

Posted by Pen Ttt (luofeiyu)
on 2010-05-30 02:57
hi ,everyone,i made a gui with fxruby,there is a problem, can't input
chinese in the fox gui ,how to solve the problem?
Posted by Pen Ttt (luofeiyu)
on 2010-05-30 09:51
there  is an  simple program,

require 'rubygems'
require 'fox16'
require 'jcode'
$KCODE = 'u'
include Fox
application = FXApp.new("测试", "测试")
main = FXMainWindow.new(application, "Hello", nil, nil, DECOR_ALL)
FXButton.new(main, "&测试, 测试!", nil, application, FXApp::ID_QUIT)
application.create()
main.show(PLACEMENT_SCREEN)
application.run()

测试  is the meaning  of  "test",
when i run the program, an output  :
Warning: $KCODE is NONE.

chinese character can't display on the window,there are many boxes  on 
the window!

what's the matter?
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.