clipboard: use locale_encode, thanks XeCycle

This commit is contained in:
Bert 2011-05-06 18:31:52 +02:00
parent ea7118fc9e
commit 5c22ddc57c

View File

@ -37,8 +37,7 @@ sub paste {
my $str = `xsel -ob`;
if ($? == 0) {
$str =~ tr/\n/\r/;
$self->tt_write($str);
$self->tt_paste($self->locale_encode($str));
} else {
print STDERR "Error running xsel: $!\n";
}
@ -51,9 +50,8 @@ sub paste_escaped {
my $str = `xsel -ob`;
if ($? == 0) {
$str =~ tr/\n/\r/;
$str =~ s/([!#\$%&\*\(\) ='"\\\|\[\]`~,<>\?])/\\\1/g;
$self->tt_write($str);
$self->tt_paste($self->locale_encode($str));
} else {
print STDERR "Error running xsel: $!\n";
}