fixed tabs, argh

Originally committed to SVN as r1638.
This commit is contained in:
Karl Blomster 2007-10-29 15:49:46 +00:00
parent 1d3ec92627
commit c22c36c687
1 changed files with 4 additions and 4 deletions

View File

@ -17,13 +17,13 @@ open(OUTFILE, ">:utf8", $outfile) or die("Can't open $outfile: $!");
# loop over lines in the infile # loop over lines in the infile
while (<INFILE>) { while (<INFILE>) {
for (split('', $_)) { # loop over characters in the line for (split('', $_)) { # loop over characters in the line
my $cp = ord; my $cp = ord;
if ($cp < 127 or $cp == 0xFFFE or $cp == 0xFEFF) { # is it a normal ASCII codepoint or a BOM? if ($cp < 127 or $cp == 0xFFFE or $cp == 0xFEFF) { # is it a normal ASCII codepoint or a BOM?
print OUTFILE $_; # then pass through unchanged print OUTFILE $_; # then pass through unchanged
} }
else { else {
print OUTFILE "\\u", sprintf("%04x", $cp); # otherwise print as \uHEX print OUTFILE "\\u", sprintf("%04x", $cp); # otherwise print as \uHEX
} }
} }
} }