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); }