Intergrate perlio's Encode/compile
[p5sagit/p5-mst-13.2.git] / ext / Encode / compile
index 6eda5b9..a76676b 100755 (executable)
@@ -6,7 +6,7 @@ BEGIN {
 use strict;
 use Getopt::Std;
 my @orig_ARGV = @ARGV;
-my $perforce  = '$Id$';
+our $VERSION  = '0.30';
 
 # These may get re-ordered.
 # RAW is a do_now as inserted by &enter
@@ -418,6 +418,8 @@ sub compile_ucm
  $encoding{$name} = [$e2u,$u2e,$erep,$min_el,$max_el];
 }
 
+
+
 sub compile_enc
 {
  my ($fh,$name) = @_;
@@ -458,8 +460,9 @@ sub compile_enc
     {
      # So why is it 1% faster to leave the my here?
      my $line = <$fh>;
-     die "Line should be exactly 65 characters long including newline"
-       unless length ($line) == 65;
+     $line =~ s/\r\n$/\n/;
+     die "$.:${line}Line should be exactly 65 characters long including
+     newline (".length($line).")" unless length ($line) == 65;
      # Split line into groups of 4 hex digits, convert groups to ints
      # This takes 65.35                
      # map {hex $_} $line =~ /(....)/g