From: Matt Gushee Date: 2002-09-06T19:28:03+09:00 Subject: Re: ruby entry widget does not display properly On Fri, Sep 06, 2002 at 07:10:18PM +0900, Jean-Pierre Berard wrote: > In win2k ruby does not seem to be able to display properly Tk entry widget > entered > in Unicode. > I know already that ruby script written in utf-8 will display without any > difficulties thanks to the command line option rubyw -Ku script.rbw but > when one enters Unicode through the global IME in Japanese for example into > an Tk entry widget one gets an ugly cursor obstructing most of the display > and nothing else except a series of strings ????? > > When the equivalent is done under Tcl/Tk, the Japanese characters are > displayed > beautifully without any ugly showing up of the cursor! > Any pointer is most welcome since I am new to ruby. > > TkEntry.new { > insertwidth 40 This is part of the problem. Instead of 'insertwidth', use 'width', just as you would in Tk. The config options almost always have the same names in Ruby/Tk as in Tcl/Tk ... it's just the syntax that's different. > font 'Times 16 normal' Does your Times font include Japanese characters? I suppose it must, since it worked with Tcl/Tk. But if you're not sure, try using a different font that you know includes Japanese characters. -- Matt Gushee Englewood, Colorado, USA mgushee@havenrock.com http://www.havenrock.com/