Re: UTF8 problems...
| From: | Ivan Rodriguez | Date: | Tue, 07 Feb 2006 12:06:26 +0000 |
| Subject: | Re: UTF8 problems... | ||
| References: | 1 2 3 4 5 | Groups: | php.gtk.dev |
| Request: | Send a blank email to php-gtk-dev+get-2365@lists.php.net to get a copy of this message | ||
Hi Pablo,
I run your script and I dont have any problem, the names shows well
You can view here:
epplestun@epplestun:~/Proyectos$ more test.php
<?php
$window = new GtkWindow;
$window->set_default_size(200,200);
$window->set_position(GTK::WIN_POS_CENTER);
$list = new GtkTreeView;
$model = new GtkListStore(Gtk::TYPE_STRING);
$list->set_model($model);
$column1 = new GtkTreeViewColumn();
$cell_renderer1 = new GtkCellRendererText();
$column1->pack_start($cell_renderer1, true);
$column1->set_attributes($cell_renderer1, 'text', 0);
$list->append_column($column1);
$data[] = array('Pedro');
$data[] = array('Maria');
$data[] = array('José');
$data[] = array('Automóvel');
$data[] = array('João');
foreach ($data as $copa)
{
$iter = $model->append($copa);
}
$window->add($list);
$window->show_all();
Gtk::Main();
?>
epplestun@epplestun:~/Proyectos$ php5 test.php
epplestun@epplestun:~/Proyectos$
I have this version of PHP
epplestun@epplestun:~/Proyectos$ php5 -v
PHP 5.1.3-dev (cli) (built: Jan 26 2006 18:37:47)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
And the version f php-gtk is 2.0.0-dev
For me is not a bug :-(
On 2/7/06, Steph Fox <steph@zend.com> wrote:
>
> hm, but if you didn't 'bug' it nobody would investigate to find out ;)
>
> ----- Original Message -----
> From: "Pablo Dall'Oglio" <pablo@dalloglio.net>
> To: "Steph Fox" < steph@zend.com>
> Cc: <php-gtk-dev@lists.php.net>
> Sent: Tuesday, February 07, 2006 5:25 AM
> Subject: Re: [PHP-GTK-DEV] UTF8 problems...
>
>
> > Of course, I haven't done this yet because I didn't know it was a really
> > bug or the standard Gtk behavior :-)
> >
> > Pablo
> >
> > Em Ter, 2006-02-07 Ã s 05:04 +0200, Steph Fox escreveu:
> >> Pablo: could you please make a short test script for this and submit it
> >> as a
> >> bug report?
> >>
> >> (http://bugs.php.net)
> >>
> >> ----- Original Message -----
> >> From: "Pablo Dall'Oglio" <pablo@dalloglio.net>
> >> To: <php-gtk-dev@lists.php.net >
> >> Sent: Tuesday, February 07, 2006 2:18 AM
> >> Subject: Re: [PHP-GTK-DEV] UTF8 problems...
> >>
> >>
> >> > Em Seg, 2006-02-06 Ã s 22:16 -0200, Pablo Dall'Oglio escreveu:
> >> >> This code below, gives me:
> >> >> (teste.php:8970): Pango-WARNING **: Invalid UTF-8 string passed to
> >> >> pango_layout_set_text()
> >> >>
> >> >> Everytime I pass the mouse cursor over accented characters
> >> >> Besides showing nothing besides the accented character in the
> list...
> >> >
> >> > Besides showing nothing after...
> >> >
> >> >>
> >> >> I know that using utf8_encode() solves the problem. But is there
> >> >> another
> >> >> workaround ?
> >> >>
> >> >> <?php
> >> >> $window = new GtkWindow;
> >> >> $window->set_default_size(200,200);
> >> >> $window->set_position(GTK::WIN_POS_CENTER);
> >> >>
> >> >> $list = new GtkTreeView;
> >> >>
> >> >> $model = new GtkListStore(Gtk::TYPE_STRING);
> >> >> $list->set_model($model);
> >> >>
> >> >> $column1 = new GtkTreeViewColumn();
> >> >>
> >> >> $cell_renderer1 = new GtkCellRendererText();
> >> >> $column1->pack_start($cell_renderer1, true);
> >> >>
> >> >> $column1->set_attributes($cell_renderer1, 'text', 0);
> >> >>
> >> >> $list->append_column($column1);
> >> >>
> >> >> $data[] = array('Pedro');
> >> >> $data[] = array('Maria');
> >> >> $data[] = array('JosÃÂ(c)');
> >> >> $data[] = array('Automóvel');
> >> >> $data[] = array('João');
> >> >>
> >> >> foreach ($data as $copa)
> >> >> {
> >> >> $iter = $model->append($copa);
> >> >> }
> >> >>
> >> >> $window->add($list);
> >> >> $window->show_all();
> >> >> Gtk::Main();
> >> >> ?>
> >> >> --
> >> >> :: Pablo Dall'Oglio
> >> >> :: www.dalloglio.net
> >> >>
> >> > --
> >> > :: Pablo Dall'Oglio
> >> > :: www.dalloglio.net
> >> >
> >> > --
> >> > PHP-GTK Development Mailing List (
> >> > http://gtk.php.net/)
> >> > To unsubscribe, visit:
> >> > http://www.php.net/unsub.php
> >> >
> >> >
> >> > __________ NOD32 1.1380 (20060125) Information __________
> >> >
> >> > This message was checked by NOD32 antivirus system.
> >> > http://www.eset.com
> >> >
> >> >
> >>
> > --
> > :: Pablo Dall'Oglio
> > :: www.dalloglio.net
> >
> > --
> > PHP-GTK Development Mailing List (http://gtk.php.net/ )
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> > __________ NOD32 1.1380 (20060125) Information __________
> >
> > This message was checked by NOD32 antivirus system.
> > http://www.eset.com
> >
> >
>
> --
> PHP-GTK Development Mailing List (http://gtk.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>