Commits

juster committed c55e9cf

UTF-8 encoding and decoding for PKGBUILD files stored in cache.

  • Participants
  • Parent commits 588215e

Comments (0)

Files changed (1)

File lib/PBCache.pm

     my $path = _path( $pkgname );
     return undef unless -f $path;
 
-    open my $fh, '<', $path or die "open: $!";
+    open my $fh, '<:encoding(utf8)', $path or die "open: $!";
     local $/;
     return <$fh>;
 }
     my ($pkgname, $pbtext, $mtime) = @_;
 
     my $path = _path( $pkgname );
-    open my $fh, '>', $path or die "open: $!";
+    open my $fh, '>:encoding(utf8)', $path or die "open: $!";
     print $fh $pbtext or die "print: $!";
     close $fh;