Re: GtkTextView and Euro Symbol -> segfault

From: Date: Fri, 17 Nov 2006 01:54:56 +0000
Subject: Re: GtkTextView and Euro Symbol -> segfault
References: 1  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-7477@lists.php.net to get a copy of this message
Hi Malk0, On 15 Nov 2006 at 16:01, Malk0 wrote: > Hi all, > trying to make a simple app to work on regular expression i am in > trouble with the € symbol. > I can type the euro symbol in the gtktextview without any problem and it > display it really nicy but as soon as i try to get the content of a > gtktextbuffer that have such a symbol in it the app just segfault: zsh: > segmentation fault php RExpEd.php > > here's the line where the error occur: > $str = $buf_text->get_text($buf_text->get_start_iter(), > $buf_text->get_end_iter()); > > is this something i'm doing wrong or a bug? > can someone help me on this one? I had similar problems. When getting the text string from a GtkTextBuffer or a GtkEntry, I would get a crash if there were certain characters involved, amongst others the euro symbol. The point here is that gtk uses utf-8 internally for all text. If your system character set is not utf-8, when you get a text string from a widget it has to be transcoded. In my case, the php-gtk.codepage setting in my php.ini was wrong - it was set to iso-8859-1 but on my windows box I should have set it to CP1252. If your system can use utf-8 (not unlikely on linux) set the php- gtk.codepage to utf-8, otherwise you may try iso-8859-15 (which includes the euro symbol, while iso-8859-1 does not). Hope this helps. -- André =========================================================== Black Holes were created when God divided by zero.

« previous php.gtk.general (#7477) next »