Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > [Ruby-gnome2][Bug] segmentation fault with ComboBox and spanish characters

Reply
Thread Tools

[Ruby-gnome2][Bug] segmentation fault with ComboBox and spanish characters

 
 
David Espada
Guest
Posts: n/a
 
      03-03-2004
Hi all.

I have a little problem when setting a list of options in a ComboBox
with spanish characters. When I type and complete with Alt+Tab,
program goes inestable, crashing after a moment or making impossible
to type more.

When executing from console, I get critical messages about Bonobo and
UTF-8 characters, like:

** (dequebarrio:1770): WARNING **: Invalid UTF8 string passed
to pango_layout_set_text()

I use Ruby 1.8.1 and Ruby-gnome2 0.8.1-8 in Debian Sid. Has any of
you same problem? Is it a question solved in 0.9 version?

Thanks a lot for your excellent work.

David

P.D. Sorry for not using mailing list, but I have problems sending
messages to ruby-gnome2-devel-en.
 
Reply With Quote
 
 
 
 
Masao Mutoh
Guest
Posts: n/a
 
      03-03-2004
Hi,

On Wed, 3 Mar 2004 18:54:45 +0900
David Espada <(E-Mail Removed)> wrote:

> Hi all.
>
> I have a little problem when setting a list of options in a ComboBox
> with spanish characters. When I type and complete with Alt+Tab,
> program goes inestable, crashing after a moment or making impossible
> to type more.


> When executing from console, I get critical messages about Bonobo and
> UTF-8 characters, like:
>
> ** (dequebarrio:1770): WARNING **: Invalid UTF8 string passed
> to pango_layout_set_text()
>
> I use Ruby 1.8.1 and Ruby-gnome2 0.8.1-8 in Debian Sid. Has any of
> you same problem? Is it a question solved in 0.9 version?


What charset do you use ?
All strings you pass to GTK+ functions must be in UTF-8.

See http://ruby-gnome2.sourceforge.jp/hiki.cgi?tips_i18n

> P.D. Sorry for not using mailing list, but I have problems sending
> messages to ruby-gnome2-devel-en.


Don't mind .

--
:% Masao Mutoh<(E-Mail Removed)>


 
Reply With Quote
 
 
 
 
David Espada
Guest
Posts: n/a
 
      03-03-2004
El miércoles 03 de marzo, Masao Mutoh escribió:
>> I have a little problem when setting a list of options in a ComboBox
>> with spanish characters. When I type and complete with Alt+Tab,
>> program goes inestable, crashing after a moment or making impossible
>> to type more.

>
> What charset do you use ?


UTF-8

I pass data received from a database with UTF-8 coding. It works
normally on other widgets without problems.

> All strings you pass to GTK+ functions must be in UTF-8.


Problem seems only to raise when I try using autocomplete with
Alt+Tab

> See http://ruby-gnome2.sourceforge.jp/hiki.cgi?tips_i18n


Good. I'll read. Thanks.

David
 
Reply With Quote
 
Masao Mutoh
Guest
Posts: n/a
 
      03-03-2004
Hi,

On Thu, 4 Mar 2004 00:34:44 +0900
David Espada <(E-Mail Removed)> wrote:

> >> I have a little problem when setting a list of options in a ComboBox
> >> with spanish characters. When I type and complete with Alt+Tab,
> >> program goes inestable, crashing after a moment or making impossiblea
> >> to type more.

> >
> > What charset do you use ?

>
> UTF-8
>
> I pass data received from a database with UTF-8 coding. It works
> normally on other widgets without problems.
>
> > All strings you pass to GTK+ functions must be in UTF-8.

>
> Problem seems only to raise when I try using autocomplete with
> Alt+Tab


Autocomplete ? Is it Gtk::Combo?

Hmm. I don't know Gtk::Combo has autocomplete feature.
Is it about other Widget?

Could you send a sample(small one, please;->)?

--
:% Masao Mutoh<(E-Mail Removed)>


 
Reply With Quote
 
David Espada
Guest
Posts: n/a
 
      03-04-2004
El miércoles 03 de marzo, Masao Mutoh escribió:
>> > All strings you pass to GTK+ functions must be in UTF-8.

>>
>> Problem seems only to raise when I try using autocomplete with
>> Alt+Tab

>
> Autocomplete ? Is it Gtk::Combo?


Yes

> Hmm. I don't know Gtk::Combo has autocomplete feature.
> Is it about other Widget?


Try yourself with a number of assigned values (set_popdown_strings)
and Alt+Tab

> Could you send a sample(small one, please;->)?


Well. In this example, you can select perfectly a value in combo with
mouse, but if you type until a special spanish character and next use
Alt+Tab combination in order to auto-complete word, widget run
unstable and it is difficult to select a value until you type
backspace repeatedly.

Code:
--------------------------------------------------------------
#!/usr/bin/ruby

require 'glib2'
require 'gtk2'

Gtk::init

ventana = Gtk::Window.new
ventana.set_title("Problemas con carácteres latinos")
ventana.signal_connect('delete_event') {exit}


vbox = Gtk::VBox::new(true, 10)

boton = Gtk::Button.new('_cerrar', true)
boton.signal_connect('clicked') do Gtk::main_quit end

entra = Gtk::Entry.new()
entra.set_text("This widget works perfectly: áéÃ*óúñññ")

combo = Gtk::Combo.new()
combo.set_popdown_strings(['árbol', 'pelÃ*cula', 'edredón'])
combo.set_use_arrows(false)
combo.set_value_in_list(true, true)

vbox.pack_start(entra, true, true, 0)
vbox.pack_start(combo, true, true, 0)
vbox.pack_start(boton, true, true, 0)

ventana.add(vbox)

ventana.show_all

Gtk.main
--------------------------------------------------------

Special characters are in UTF-8. If you have any problem to probe,
I'll send you file.

Thanks.

David
 
Reply With Quote
 
Masao Mutoh
Guest
Posts: n/a
 
      03-04-2004
--Multipart=_Fri__5_Mar_2004_03_37_14_+0900_Lk4NEqDc NTuuY0oz
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

Hi,

On Thu, 4 Mar 2004 17:20:58 +0900
David Espada <(E-Mail Removed)> wrote:

> >> > All strings you pass to GTK+ functions must be in UTF-8.
> >>
> >> Problem seems only to raise when I try using autocomplete with
> >> Alt+Tab

> >
> > Autocomplete ? Is it Gtk::Combo?

>
> Yes
>
> > Hmm. I don't know Gtk::Combo has autocomplete feature.
> > Is it about other Widget?

>
> Try yourself with a number of assigned values (set_popdown_strings)
> and Alt+Tab
>
> > Could you send a sample(small one, please;->)?

>
> Well. In this example, you can select perfectly a value in combo with
> mouse, but if you type until a special spanish character and next use
> Alt+Tab combination in order to auto-complete word, widget run
> unstable and it is difficult to select a value until you type
> backspace repeatedly.


GTK+ C version gets same result.
It seems a bug of GTK+. Try attached file.

gcc -o test `pkg-config gtk+-2.0 --libs --cflags` test.c

--
:% Masao Mutoh<(E-Mail Removed)>


--Multipart=_Fri__5_Mar_2004_03_37_14_+0900_Lk4NEqDc NTuuY0oz
Content-Type: application/octet-stream;
name="test.c"
Content-Disposition: attachment;
filename="test.c"
Content-Transfer-Encoding: base64

I2luY2x1ZGUgPGd0ay9ndGsuaD4KI2luY2x1ZGUgPGxvY2FsZS 5oPgoKaW50IG1haW4oaW50IGFy
Z2MsIGNoYXIqKiBhcmd2KXsgIAogIEd0a1dpZGdldCAqd2luZG 93LCAqY29tYm87CiAgR0xpc3Qq
IGdsaXN0ID0gTlVMTDsKCiAgc2V0bG9jYWxlKExDX0FMTCwgIi IpOwogIGdsaXN0ID0gZ19saXN0
X2FwcGVuZChnbGlzdCwgIsOhcmJvbCIpOwogIGdsaXN0ID0gZ1 9saXN0X2FwcGVuZChnbGlzdCwg
InBlbMOtY3VsYSIpOwogIGdsaXN0ID0gZ19saXN0X2FwcGVuZC hnbGlzdCwgImVkcmVkw7NuIik7
CgogIGd0a19pbml0KCZhcmdjLCAmYXJndik7CgogIGNvbWJvID 0gZ3RrX2NvbWJvX25ldygpOwoK
ICBndGtfY29tYm9fc2V0X3BvcGRvd25fc3RyaW5ncyhHVEtfQ0 9NQk8oY29tYm8pLCBnbGlzdCk7
CgogIHdpbmRvdyA9IGd0a193aW5kb3dfbmV3KEdUS19XSU5ET1 dfVE9QTEVWRUwpOwogIGd0a19j
b250YWluZXJfYWRkKEdUS19DT05UQUlORVIgKHdpbmRvdyksIE dUS19XSURHRVQoY29tYm8pKTsK
ICBndGtfd2lkZ2V0X3Nob3dfYWxsKHdpbmRvdyk7CgogIGd0a1 9tYWluKCk7CiAgcmV0dXJuIDA7
Cn0KCg==

--Multipart=_Fri__5_Mar_2004_03_37_14_+0900_Lk4NEqDc NTuuY0oz--


 
Reply With Quote
 
David Espada
Guest
Posts: n/a
 
      03-05-2004
El jueves 04 de marzo, Masao Mutoh escribió:
>> Well. In this example, you can select perfectly a value in combo with
>> mouse, but if you type until a special spanish character and next use
>> Alt+Tab combination in order to auto-complete word, widget run
>> unstable and it is difficult to select a value until you type
>> backspace repeatedly.

>
> GTK+ C version gets same result.
> It seems a bug of GTK+. Try attached file.


Same problem. I suspected it

It seems that problem has not been reported to Gtk bugzilla nor Debian
bug database. I'll write a report.

Thanks, Masao.

David
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Combobox Project: How to put 4 text items in the combobox christopher.m.lusardi@gmail.com Java 5 10-11-2012 09:29 PM
dictionary spanish-english/english spanish Ant1 Computer Support 2 12-15-2007 08:57 PM
Spanish Vista or Spanish MUI? =?Utf-8?B?Q2FybG9z?= Windows 64bit 4 09-07-2006 02:37 AM
File Read Spanish characters Chip ASP .Net 3 12-14-2005 07:04 PM
Javascript String Termination Error Spanish Characters with ASP.NET Garth17 ASP .Net 0 03-16-2005 12:20 AM



Advertisments