return unless (-f "$file");
my $fh = new FileHandle;
- open $fh, "$file" or die "$! : $file";
+ open $fh, '<:encoding(utf8)', $file or die "$! : $file";
my ($is_submit, $line_no, $sub_line_no) = (0, 0, 0);
my $file = shift;
my $fh = new FileHandle;
- open $fh, "$file" or die "$! : $file";
+ open $fh, '<:encoding(utf8)', $file or die "$! : $file";
my @a = grep m/^\[/, <$fh>;
close($fh);
my %plugins = ( 'loaded' => { }, 'needed' => { } );
- if (!open(IN, $file)) {
+ if (!open(IN, '<:encoding(utf8)', $file)) {
print "E: template file '$file' not found\n";
return;
}
sub scan_javascript_file {
my ($file) = @_;
- open(my $fh, $file) || die('can not open file: '. $file);
+ open(my $fh, '<:encoding(utf8)', $file) || die('can not open file: '. $file);
while( my $line = readline($fh) ) {
while( $line =~ m/