Skip Menu |

This queue is for tickets about the PAR-Packer CPAN distribution.

Report information
The Basics
Id: 12032
Status: new
Priority: 0/
Queue: PAR-Packer

People
Owner: Nobody in particular
Requestors: rh62121 [...] yahoo.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Subject: garbled characters in Tk
I load data from Tk widget into DBD::CSV and then back to the widget. Characters over \x100 are garbled when retrieved from db. Characters in widgets over \x100 not manipulated by db (Tk labels) are correct. A script uses encoding 'utf-8' pragma. Running a script without packing doesn't exhibit this problem. test.pl included PAR 0.87, perl 5.8.6, Windows XP DBI 1.47, DBD::CSV 0.21 Radek
use DBI qw(:utils); use Tk; use encoding 'utf-8'; require encoding; use strict; use warnings; my ($dir,$mw,$en,$dbh,$sth,$values,$text,@line,$desc,$desc2); $mw = MainWindow->new(); $mw->geometry("100x50"); $mw->Label(-text=>'žž', -width=>20, )->pack; $en = $mw->Entry(-width=>20, )->pack; $en->focus; $dbh = DBI->connect("DBI:CSV:csv_sep_char=\\|",{RaiseError => 1,AutoCommit => 1}) or die "Cannot connect: " . $DBI::errstr; $values = "('šš','žž','cc')"; $desc = data_string_desc($values); print "before: $desc\n"; $dbh->do(qq/INSERT INTO test VALUES $values/) or die "Cannot insert: " . $DBI::errstr; $sth = $dbh->prepare(qq/SELECT * FROM test/); $sth->execute(); @line = $sth->fetchrow_array; $text = "@line"; $desc2 = data_string_desc($text); print "after: $desc2\n"; $sth->finish; $dbh->disconnect; $en->configure(-textvariable=>\$text); MainLoop; =head2 test DB one|two|three šš|žž|cc =cut