angico
8/18/2008 9:59:00 PM
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 =C3=A0s 06:44 +0900, Axel Etzold escreveu:
> Dear Angico,
>=20
> 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:
>=20
> require "rubygems"
> require "iconv"
> require 'fox16'
>=20
> include Fox
>=20
>=20
> theApp =3D FXApp.new
> text =3D Iconv.iconv("utf-8","iso-8859-1","Interpreta=C3=A7=C3=A3o do Bra=
sil")
> p text
>=20
>=20
> theMainWindow =3D FXMainWindow.new(theApp, text[0])
> text2=3D"O Brasil do futuro n=C3=A3o vai ser o que os velhos historiadore=
s disserem e os de hoje repetem. Vai ser o que Gilberto Freyre disser. Frey=
re =C3=A9 um dos g=C3=AAnios de palheta mais rica e iluminante que estas te=
rras ant=C3=A1rticas ainda produziram."
> message =3D Iconv.iconv("utf-8","iso-8859-1",text2)
>=20
> theButton =3D FXButton.new(theMainWindow, message[0])
> theButton.connect(SEL_COMMAND) do |sender, selector, data|
> exit
> end
>=20
> theApp.create
>=20
> theMainWindow.show
> theApp.run
>=20
> Best regards,
>=20
> Axel=20
>=20
--=20
angico
------
home page: www.angico.org
Gnu/Linux, FLOSS, Espiritismo, e eu por mim mesmo 8^I
------
contatos:
email: angico@angico.org
skype: angico00
------