View | Details | Raw Unified | Return to bug 25305
Collapse All | Expand All

(-)a/C4/TTParser.pm (-1 / +2 lines)
Lines 64-70 sub build_tokens{ Link Here
64
#    $self->handler(default => "default", "self, line, text, is_cdata"); # anything else
64
#    $self->handler(default => "default", "self, line, text, is_cdata"); # anything else
65
    $self->marked_sections(1); #treat anything inside CDATA tags as text, should really make it a C4::TmplTokenType::CDATA
65
    $self->marked_sections(1); #treat anything inside CDATA tags as text, should really make it a C4::TmplTokenType::CDATA
66
    $self->unbroken_text(1); #make contiguous whitespace into a single token (can span multiple lines)
66
    $self->unbroken_text(1); #make contiguous whitespace into a single token (can span multiple lines)
67
    $self->parse_file($filename);
67
    open(my $fh, "<:encoding(utf8)", $filename) || die "Cannot open $filename ($!)";
68
    $self->parse_file($fh);
68
    return $self;
69
    return $self;
69
}
70
}
70
71
(-)a/misc/translator/xgettext.pl (-4 / +3 lines)
Lines 255-261 EOF Link Here
255
###############################################################################
255
###############################################################################
256
256
257
sub convert_translation_file {
257
sub convert_translation_file {
258
    open(my $INPUT, '<', $convert_from) || die "$convert_from: $!\n";
258
    open(my $INPUT, '<:encoding(utf-8)', $convert_from) || die "$convert_from: $!\n";
259
    VerboseWarnings::set_input_file_name $convert_from;
259
    VerboseWarnings::set_input_file_name $convert_from;
260
    while (<$INPUT>) {
260
    while (<$INPUT>) {
261
	chomp;
261
	chomp;
Lines 367-373 usage_error('You cannot specify both --convert-from and --files-from') Link Here
367
367
368
if (defined $output && $output ne '-') {
368
if (defined $output && $output ne '-') {
369
    print STDERR "$0: Opening output file \"$output\"\n" if $verbose_p;
369
    print STDERR "$0: Opening output file \"$output\"\n" if $verbose_p;
370
        open($OUTPUT, '>:encoding(utf-8)', $output) || die "$output: $!\n";
370
    open($OUTPUT, '>:encoding(utf-8)', $output) || die "$output: $!\n";
371
} else {
371
} else {
372
    print STDERR "$0: Outputting to STDOUT...\n" if $verbose_p;
372
    print STDERR "$0: Outputting to STDOUT...\n" if $verbose_p;
373
    open($OUTPUT, ">&STDOUT");
373
    open($OUTPUT, ">&STDOUT");
Lines 375-381 if (defined $output && $output ne '-') { Link Here
375
375
376
if (defined $files_from) {
376
if (defined $files_from) {
377
    print STDERR "$0: Opening input file list \"$files_from\"\n" if $verbose_p;
377
    print STDERR "$0: Opening input file list \"$files_from\"\n" if $verbose_p;
378
    open(my $INPUT, '<', $files_from) || die "$files_from: $!\n";
378
    open(my $INPUT, '<:encoding(utf-8)', $files_from) || die "$files_from: $!\n";
379
    while (<$INPUT>) {
379
    while (<$INPUT>) {
380
	chomp;
380
	chomp;
381
	my $input = /^\//? $_: "$directory/$_";
381
	my $input = /^\//? $_: "$directory/$_";
382
- 

Return to bug 25305