1 2 3 4
use Encode; use utf8; binmode STDOUT, ":encoding(cp852)"; # für Umlaute im DOS-Fenster binmode STDERR, ":encoding(cp852)";
1 2 3 4 5 6 7 8 9 10 11 12 13
sub load_recent_page_data{ my( $STC ) = @_; if( -f Win32::GetFullPathName( File::Spec->catfile($recent_nb, $recent_page) ) ){ my $tmp_path = Win32::GetFullPathName( File::Spec->catfile($recent_nb, $recent_page) ); $STC->SetCodePage(65001); $STC->LoadFile( $tmp_path ); $STC->SetCurrentPos( $STC->GetTextLength()); $STC->SetSelection( $STC->GetTextLength(), $STC->GetTextLength()); } else{ INFO "default page exists not..."; } }
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 30 31 32 33 34 35 36 37
sub save_STC_values{ my ( $this ) = @_; # TODO: check, if the file has changed - if not, do nothing print "save file...\n"; my $STC = $this->FindWindow(Wx::XmlResource::GetXRCID('STC_edit')); my $tmp_path = Win32::GetFullPathName( File::Spec->catfile($recent_nb, $recent_page) ); my %H_cur_data; my $stc_content = $STC->GetText(); my @A_stc_content = split("\n", $stc_content); my @A_new_stc_content; my $line_counter = 1; # TODO: find all data from "this" file in DB and remove them! foreach my $cur_line( @A_stc_content ){ my $sorted_line = BT_Parse_Line::parse_line( $cur_line, \%H_cur_data, $H_cfgs ); if( $sorted_line){ push( @A_new_stc_content, $sorted_line ); DB_WorkOn::check_linedata( \%H_cur_data, $line_counter, $tmp_path ); DB_WorkOn::insert_linedata( \%H_cur_data, $line_counter, $tmp_path ); } else{ push( @A_new_stc_content, ""); } $line_counter++; } $STC->SetText(''); $STC->SetText(join("\n", @A_new_stc_content)."\n"); print $STC->GetCodePage()."\n"; $STC->SaveFile( $tmp_path ); get_classifications_from_db(); }
QuoteSaving code uses wxConvCurrent, so you could try setting it to wxConvUTF8 to ensure that UTF-8 is used even when it's not the encoding of the current locale (which is never the case under Windows).
2015-08-21T09:18:53 RaubtierAnklicken dieses Links ergab bei mir (s. Attachment)
Guest JürgenP.S.: Wie kann ich denn als "Gast" Themen, die gelöst sind, als solche markieren?