Thread PAR - Probleme (8 answers)
Opened by GoodFella at 2007-04-24 02:33

GoodFella
 2007-04-27 05:31
#76155 #76155
User since
2007-01-09
192 Artikel
BenutzerIn
[default_avatar]
Test 2:

Code (perl): (dl )
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);
 }


Ausgabe CMD:

Quote
display_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,


Ausgabe PAR:

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,



..identische Daten, verschiedene Ergebnisse. Hrrmmz.\n\n

<!--EDIT|GoodFella|1177638157-->

View full thread PAR - Probleme