Permalink
Browse files

Tell Perl that the files might have UTF-8.

  • Loading branch information...
chrismgray committed Mar 15, 2012
1 parent 77fbc78 commit a580fa8dfa69741fd5bac6d63d7d79cd9038ae0f
Showing with 2 additions and 0 deletions.
  1. +2 −0 perl/new_org.pm
View
@@ -14,6 +14,8 @@ sub run_func_in_emacs($$;$) {
my $args = shift;
my ($tf1, $tn1) = tempfile("/tmp/ikiwiki-org-1-XXXXX"); # Perl output, emacs input
my ($tf2, $tn2) = tempfile("/tmp/ikiwiki-org-2-XXXXX"); # Perl input, emacs output
+ binmode($tf1, ":utf8");
+ binmode($tf2, ":utf8");
print $tf1 $content;
if (!defined $args) { $args = ""; }
# WARNING: possible security hole

0 comments on commit a580fa8

Please sign in to comment.