From a3d4e5578ea123823c5c36bf34ff0a74cba6065d Mon Sep 17 00:00:00 2001 From: short <> Date: Sun, 6 Jun 2004 13:48:29 +0000 Subject: [PATCH 1/1] Fixed utf8-related Perl corruption of the bundled data. --- src/bundle.pl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/bundle.pl b/src/bundle.pl index 860179b..1659f6f 100755 --- a/src/bundle.pl +++ b/src/bundle.pl @@ -24,7 +24,8 @@ use strict; use warnings; use File::Basename; -use bytes; +no utf8; +use bytes; # REQUIRED print <<"EOH"; @@ -59,7 +60,9 @@ for my $pathname (@ARGV) { "filename" =>$filename, "filename_sym"=>$filename_sym, }; - $F=pack("N*",length($F)).$F; # Prefix 32-bit network byte order file length. + # Do not: pack("N",length($F)).$F + # as there would be utf8 encoding hassle. + $F=pack("Na*",length($F),$F); # Prefix 32-bit network byte order file length. my $Fout=unpack "H*",$F; $Fout=~s/../0x$&,/g; $Fout=~s/(?:.....){1,16}/\t\t$&\n/g; -- 1.8.3.1