X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=scripts%2Flocales.pl;h=24b06877f0690577fc1468985014ca513432174a;hb=f9676efea9ccfa01df2a57dca9c45cc8fde0d09e;hp=2174c2d819042c183ac064785706ecbed79369eb;hpb=cb3274d509066b4c39866e809a5b3e854c82226c;p=kivitendo-erp.git diff --git a/scripts/locales.pl b/scripts/locales.pl index 2174c2d81..24b06877f 100755 --- a/scripts/locales.pl +++ b/scripts/locales.pl @@ -85,6 +85,9 @@ if (-f "$locales_dir/lost") { unlink "$locales_dir/lost"; } +my $charset = slurp("$locales_dir/charset") || 'utf-8'; +chomp $charset; + my %old_texts = %{ $self->{texts} || {} }; map({ handle_file($_, $bindir); } @progfiles); @@ -158,7 +161,7 @@ EOL EOL $LOST_HEADER = <', $file or die "$! : $file"; - print $fh "#!/usr/bin/perl\n# -*- coding: iso-8859-15; -*-\n\n"; + print $fh "#!/usr/bin/perl\n# -*- coding: $charset; -*-\n# vim: fenc=$charset\n\n"; print $fh $header, "\n" if $header; print $fh "$data_name = $delim[0]\n" if $data_name; @@ -608,6 +611,11 @@ sub generate_file { close $fh; } +sub slurp { + my $file = shift; + do { local ( @ARGV, $/ ) = $file; <> } +} + __END__ =head1 NAME