From: Nikolay Ponomarenko Date: 2003-11-20T15:58:37+09:00 Subject: Re: Encoding in ruby/tk internals Hello Hidetoshi, Wednesday, November 19, 2003, 11:23:19 AM, you wrote: >> In pure Tcl all works normal - >> encoding system "cp1251" >> -command [list tblCmd $table(array) %i %C %s] >> >> %s value is passing to tblCmd in cp1251 >> but when i try to do something like that in ruby >> >> Tk.encoding = 'CP1251' >> @entry = TkEntry.new >> @entry.configure('validatecommand',[proc {|s| v(s)},'%s']) >> >> %s is passing to v in utf-8 :( HN> After calling Tk.encoding_system = 'cp1251', HN> do you get the same result? Yes. something like Tk.encoding_system = 'cp1251' # or Tk.encoding = 'cp1251' $btn = TkButton.new($root) { text "and here text in cp1251" } works right Problem is only with "%" values :( -- Best regards, Nikolay