From: angico Date: 2008-08-19T06:58:30+09:00 Subject: Re: accented letters Hi, Axel. Thank you for the hints, but I think I didn't express myself clearly. Actually, when the text is presented on the FXText control (coming from a database), the control shows the accented letters pretty well. The problem is when I try to insert new text. The application seems to ignore the keystrokes relative to the accents, accepting just the following keystroke, which is the actual letter. I've already post this on the FXRuby users list, but they think it's a Ruby matter. I hope somebody could help me with this. Cheers, Em Ter, 2008-08-19 às 06:44 +0900, Axel Etzold escreveu: > Dear Angico, > > you'll need to convert your text to utf-8 encoding using Iconv. > Have a look at this (somewhat randomly copied from a Wikipedia > article about the Brazilian sociologist Gilberto Freyre) and the FXRuby > tutorial: > > require "rubygems" > require "iconv" > require 'fox16' > > include Fox > > > theApp = FXApp.new > text = Iconv.iconv("utf-8","iso-8859-1","Interpretação do Brasil") > p text > > > theMainWindow = FXMainWindow.new(theApp, text[0]) > text2="O Brasil do futuro não vai ser o que os velhos historiadores disserem e os de hoje repetem. Vai ser o que Gilberto Freyre disser. Freyre é um dos gênios de palheta mais rica e iluminante que estas terras antárticas ainda produziram." > message = Iconv.iconv("utf-8","iso-8859-1",text2) > > theButton = FXButton.new(theMainWindow, message[0]) > theButton.connect(SEL_COMMAND) do |sender, selector, data| > exit > end > > theApp.create > > theMainWindow.show > theApp.run > > Best regards, > > Axel > -- angico ------ home page: www.angico.org Gnu/Linux, FLOSS, Espiritismo, e eu por mim mesmo 8^I ------ contatos: email: angico@angico.org skype: angico00 ------