[sword-svn] r352 - trunk/modules/misc_cleanup

chrislit at crosswire.org chrislit at crosswire.org
Sat Feb 25 18:56:29 MST 2012


Author: chrislit
Date: 2012-02-25 18:56:29 -0700 (Sat, 25 Feb 2012)
New Revision: 352

Modified:
   trunk/modules/misc_cleanup/title_cleanup.pl
Log:
fixed output encoding handling to not double-encode UTF-8 (following suggestions at http://search.cpan.org/~shlomif/XML-LibXML-1.92/LibXML.pod#ENCODINGS_SUPPORT_IN_XML::LIBXML

Modified: trunk/modules/misc_cleanup/title_cleanup.pl
===================================================================
--- trunk/modules/misc_cleanup/title_cleanup.pl	2012-02-25 23:30:56 UTC (rev 351)
+++ trunk/modules/misc_cleanup/title_cleanup.pl	2012-02-26 01:56:29 UTC (rev 352)
@@ -40,7 +40,7 @@
 
 use XML::LibXML;
 use strict;
-binmode (STDOUT,":utf8");
+binmode STDOUT;
 
 ## Obtain arguments
 if (scalar(@ARGV) < 1) {
@@ -55,7 +55,8 @@
 
 if (@ARGV[1] eq "-o") {
     $outputFilename = "@ARGV[2]";
-    open (OUTF, , ">:utf8", "$outputFilename") or die "Could not open file @ARGV[2] for writing.";
+    open (OUTF, "$outputFilename") or die "Could not open file @ARGV[2] for writing.";
+    binmode OUTF;
     select(OUTF);
 }
 




More information about the sword-cvs mailing list