Package: perl-tk
Version: 1:804.027-4
Severity: normal

Tk::Entry fields (at least) change strings that are bound to them to
UTF8 strings (even if there's only 7bit characters in the strings).
That means that anything that is concatenated with such strings
becomes UTF8 automatically.

Now, if those strings happen to be filenames which contain latin1 (or
other non-UTF8, non-ascii) characters, when they get used by perl
(e.g. with "system", or "-d $filename"), they are converted to UTF8
and therefore no longer match the filenames on disk.

code to reproduce:

#!/usr/bin/perl -w
use strict;
use Tk;

my $fn = "te\xDFt"; # ß
my $curdir = ".";
my $fullfn;
my $mw = MainWindow->new;

open F, ">$fn"; close F;
warn "touched $fn\n"; warnutf($fn);

$fullfn = "$curdir/$fn";
warn "$fullfn exists\n" if -e $fullfn;
warnutf($fullfn);

$mw->Entry(-textvariable => \$curdir);

warn "bound curdir to Entry\n";
$fullfn = "$curdir/$fn";
warn "$fullfn doesn't exist\n" unless -e $fullfn;
warnutf($fullfn);

sub warnutf {
    my $s = shift;
    warn "String is UTF-8\n" if utf8::is_utf8($s);
}




-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15.4
Locale: LANG=C, LC_CTYPE=de_AT (charmap=ISO-8859-1)

Versions of packages perl-tk depends on:
ii  libc6                     2.3.6-3        GNU C Library: Shared libraries an
ii  libjpeg62                 6b-12          The Independent JPEG Group's JPEG 
ii  libpng12-0                1.2.8rel-5     PNG library - runtime
ii  libx11-6                  6.9.0.dfsg.1-6 X Window System protocol client li
ii  perl                      5.8.8-3        Larry Wall's Practical Extraction 
ii  perl-base [perlapi-5.8.7] 5.8.8-3        The Pathologically Eclectic Rubbis
ii  zlib1g                    1:1.2.3-11     compression library - runtime

perl-tk recommends no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to