]> granicus.if.org Git - yasm/commitdiff
Fix for Perl 5.8.0 in UTF-8 locales.
authorPeter Johnson <peter@tortall.net>
Sat, 16 Aug 2003 05:37:23 +0000 (05:37 -0000)
committerPeter Johnson <peter@tortall.net>
Sat, 16 Aug 2003 05:37:23 +0000 (05:37 -0000)
svn path=/trunk/yasm/; revision=1043

test_hd.pl

index 9629d0f7c26e52a2493f03706d7e2fc845a93f76..03645e75bc1ece42edbfa77eacae98400f713a75 100755 (executable)
@@ -1,5 +1,11 @@
-#! /usr/bin/env perl
+#!/usr/bin/env perl
+
 open(BFILE,$ARGV[0]) || die "Could not open \\$ARGV[0]\\: $!";
+
+# This is needed to run correctly on systems with Perl version 5.8.0 or higher
+# and a UTF-8 locale.  This so happens to describe Tyler's setup nicely. :)
+binmode(BFILE);
+
 while(!eof(BFILE)) {
     read(BFILE, $buffer, 1);
     printf("%02x \n", ord($buffer));