![]() |
![]() |
9 Einträge, 1 Seite |
1 2 3 4 5 6 7 8 9 10 11 12
sub update_sample_data { my ($text_display, $text_data, $start_data, $end_data, $sheet, $nr, @headlines) = @_; my $display_text = $text_data->get("0.0", "end"); $display_text =~ s/$start_data([^$end_data]+?)$end_data/$sheet->Range(&get_a1($nr, &array_index($1, @headlines)))->{Value}/sgei; $text_display->delete("0.0", "end"); $text_display->insert("end", $display_text); } my $btn_show = $combi_window->Button( -text => $start_data.' abc '.$end_data, -font => ['Tahoma', 8, 'bold'], -width => 7 ); $btn_show->configure ( -command => sub { &update_sample_data($text_display, $text_data, $start_data, $end_data, $sheet, $nr, @headlines); } );
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
&debug('init'); sub update_sample_data { my ($text_display, $text_data, $start_data, $end_data, $sheet, $nr, @headlines) = @_; my $display_text = $text_data->get("0.0", "end"); &debug("display_text->isutf8 = ".(utf8::is_utf8($display_text) ? 1 : 0)); &debug("start_data->isutf8 = ".(utf8::is_utf8($start_data) ? 1 : 0)); &debug("end_data->isutf8 = ".(utf8::is_utf8($end_data) ? 1 : 0)); &debug("display_text =\n$display_text"); &debug("start_data= '$start_data'"); &debug("end_data= '$end_data'"); if ($display_text =~ /$start_data([^$end_data]+?)$end_data/si) { &debug('FOUND') } else { &debug("NOT FOUND") } $display_text =~ s/$start_data([^$end_data]+?)$end_data/$sheet->Range(&get_a1($nr, &array_index($1, @headlines)))->{Value}/sgei; $text_display->delete("0.0", "end"); $text_display->insert("end", $display_text); }
Quotedisplay_text->isutf8 = 1
start_data->isutf8 = 0
end_data->isutf8 = 0
display_text =
«Vorname»
start_data= '«'
end_data= '»'
FOUND
Quotedisplay_text->isutf8 = 1
start_data->isutf8 = 0
end_data->isutf8 = 0
display_text =
«Vorname»
start_data= '«'
end_data= '»'
NOT FOUND
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
sub update_sample_data { my ($text_display, $text_data, $start_data, $end_data, $sheet, $nr, @headlines) = @_; my $display_text = $text_data->get("0.0", "end"); &debug("display_text->isutf8 = ".(utf8::is_utf8($display_text) ? 1 : 0)); &debug("start_data->isutf8 = ".(utf8::is_utf8($start_data) ? 1 : 0)); &debug("end_data->isutf8 = ".(utf8::is_utf8($end_data) ? 1 : 0)); &debug("display_text =\n$display_text"); &debug("start_data= '$start_data'"); &debug("end_data= '$end_data'"); if ($display_text =~ /$start_data([^$end_data]+?)$end_data/si) { &debug('FOUND') } else { &debug("NOT FOUND") } my $test = ''; &debug('start_data = '.ord($start_data)); &debug('end_data = '.ord($end_data)); for(split(//,$display_text)) { $test .= "$_ = ".ord($_).", "; } &debug('Einzelzeichen = '.$test); $display_text =~ s/$start_data([^$end_data]+?)$end_data/$sheet->Range(&get_a1($nr, &array_index($1, @headlines)))->{Value}/sgei; $text_display->delete("0.0", "end"); $text_display->insert("end", $display_text); }
Quotedisplay_text->isutf8 = 1
start_data->isutf8 = 0
end_data->isutf8 = 0
display_text =
«Vorname»
start_data= '«'
end_data= '»'
FOUND
start_data = 171
end_data = 187
Einzelzeichen = « = 171, V = 86, o = 111, r = 114, n = 110, a = 97, m = 109, e = 101, » = 187,
= 10,
Quote
display_text->isutf8 = 1
start_data->isutf8 = 0
end_data->isutf8 = 0
display_text =
«Vorname»
start_data= '«'
end_data= '»'
NOT FOUND
start_data = 171
end_data = 187
Einzelzeichen = « = 171, V = 86, o = 111, r = 114, n = 110, a = 97, m = 109, e = 101, » = 187,
= 10,
utf8::downgrade($display_text);
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
truss perl -e '$x="\x{20ac}"; $x =~ m{\w}' |& grep '^open'
open("/etc/libmap.conf",0x0,0666) = 3 (0x3)
open("/usr/local/lib/perl5/5.8.8/mach/CORE/libperl.so",0x0,00) = 3 (0x3)
open("/var/run/ld-elf.so.hints",0x0,044) = 3 (0x3)
open("/lib/libm.so.4",0x0,027757760070) = 3 (0x3)
open("/lib/libcrypt.so.3",0x0,027757760070) = 3 (0x3)
open("/lib/libutil.so.5",0x0,027757760070) = 3 (0x3)
open("/lib/libc.so.6",0x0,027757760070) = 3 (0x3)
open("/usr/share/locale/de_DE.ISO8859-1/LC_COLLATE",0x0,0666) = 3 (0x3)
open("/usr/share/locale/de_DE.ISO8859-1/LC_CTYPE",0x0,0666) = 3 (0x3)
open("/usr/share/locale/de_DE.ISO8859-1/LC_MONETARY",0x0,05001220541) = 3 (0x3)
open("/usr/share/locale/de_DE.ISO8859-1/LC_NUMERIC",0x0,043) = 3 (0x3)
open("/usr/share/locale/de_DE.ISO8859-1/LC_TIME",0x0,06) = 3 (0x3)
open("/usr/share/locale/de_DE.ISO8859-1/LC_MESSAGES",0x0,0557) = 3 (0x3)
open("/dev/urandom",0x0,05001162001) = 3 (0x3)
open("/dev/null",0x0,0666) = 3 (0x3)
open("/usr/local/lib/perl5/5.8.8/utf8.pm",0x0,0666) = 3 (0x3)
open("/usr/local/lib/perl5/5.8.8/utf8_heavy.pl",0x0,0666) = 3 (0x3)
open("/usr/local/lib/perl5/5.8.8/strict.pm",0x0,0666) = 4 (0x4)
open("/usr/local/lib/perl5/5.8.8/warnings.pm",0x0,0666) = 4 (0x4)
open("/usr/local/lib/perl5/5.8.8/Carp.pm",0x0,0666) = 5 (0x5)
open("/usr/local/lib/perl5/5.8.8/Exporter.pm",0x0,0666) = 5 (0x5)
open("/usr/local/lib/perl5/5.8.8/unicore/PVA.pl",0x0,0666) = 3 (0x3)
open("/usr/local/lib/perl5/5.8.8/unicore/Exact.pl",0x0,0666) = 3 (0x3)
open("/usr/local/lib/perl5/5.8.8/unicore/lib/gc_sc/Word.pl",0x0,0666) = 3 (0x3)
![]() |
![]() |
9 Einträge, 1 Seite |