Problems with special characters and insert-text on Gtk2::Entry



Hello,

I have a problem with Gtk2::Entry when I connect a callback to insert-text
signal. All the special characters I could enter (I tested with à or à in
french) are replaced with 2 characters ("ÃÂ" or "ÃÂ"). It looks like a UTF-8
encoding problem.

This doesn't occur when removing the callback. I am using Gtk2-Perl 1.140.
There is below a small example that shows this.

Is this a known problem that has been fixed in a newer release and/or is there
a workaround?

Thank you for any help.

Christian.


#!/bin/perl

use Gtk2;
Gtk2->init;

my $window = new Gtk2::Window('toplevel');

my $entry = new Gtk2::Entry;
# Everything is OK without the next line.
$entry->signal_connect('insert-text' => sub {return ()});

$window->add($entry);
$window->show_all;
Gtk2->main;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]