[svn:Module-Build] r12866 - Module-Build/trunk/lib/Module/Build

[email protected]
Newsgroups perl.module.build.checkins
Message-ID <[email protected]>
Author: dagolden
Date: Fri Jun 19 10:07:25 2009
New Revision: 12866

Modified:
   Module-Build/trunk/lib/Module/Build/YAML.pm

Log:
fix RT#43764: [PATCH] META.yml should be encoded in UTF-8


Modified: Module-Build/trunk/lib/Module/Build/YAML.pm
==============================================================================
--- Module-Build/trunk/lib/Module/Build/YAML.pm	(original)
+++ Module-Build/trunk/lib/Module/Build/YAML.pm	Fri Jun 19 10:07:25 2009
@@ -40,6 +40,7 @@
     }
     open my $OUT, "$mode $filename"
       or die "Can't open $filename for writing: $!";
+    binmode($OUT, ':utf8');
     print $OUT Dump(@_);
     close $OUT;
 }
@@ -50,9 +51,10 @@
     my $filename = shift;
     open my $IN, $filename
       or die "Can't open $filename for reading: $!";
+    binmode($IN, ':utf8');
     return Load(do { local $/; <$IN> });
     close $IN;
-}   
+}
 
 sub _yaml_chunk {
   my ($indent, $values) = @_;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.