Some strings corrupted when inserting into liststore model

Hi all. I'm seeing some strings ( coming from a database ) corrupted
when I insert into a liststore model. I've pasted a bare-bones script
before which demonstrates the issue ( hard-coded string value in this
case ). Any ideas what's happening and how to get the original string
rendering? Interestingly, I can copy/paste directly into the
treeview/cell and it handles data input this way.



use strict;
use warnings;

use Gtk3 '-init';
use Glib 'TRUE', 'FALSE';

use Encode;

my $window = Gtk3::Window->new;
$window->signal_connect( destroy => sub { Gtk3->main_quit } );
$window->set_default_size( 300, 250 );

my $box = Gtk3::Box->new( 'vertical', 8 );

my $sw = Gtk3::ScrolledWindow->new( undef, undef );
$sw->set_policy( 'never', 'automatic' );
$box->pack_start( $sw, TRUE, TRUE, 5 );

# Create TreeModel
my $model = Gtk3::ListStore->new( 'Glib::String', );
my $iter = $model->append();
$model->set( $iter , 0 , "└─Selection_6" );

# Create a TreeView
my $treeview = Gtk3::TreeView->new($model);

# Add columns to TreeView


sub add_columns {
    my $treeview = shift;
    my $model    = $treeview->get_model();
    my $renderer = Gtk3::CellRendererText->new;
    # Column for description
    my $column = Gtk3::TreeViewColumn->new_with_attributes(
'Description', $renderer, text => 0 );

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