[prog] Perl error
David Sumbler
david at aeolia.co.uk
Fri Jan 28 05:04:21 EST 2005
I recently downloaded uni-vga from
http://www.inp.nsk.su/~bolkhov/files/fonts/univga/ .
To create the required fonts I have to run 'make'. This calls a perl
script, but I get a repeated error. The error messages consist of
lines such as:
Character in 'c' format wrapped in pack at ./bdf2psf.pl line 45, <BDF> line 991.
After a lot of experimenting, I have narrowed the problem down. The
script contains a sub-routine with the line:
$bitmaps[$encoding] .= ByteOf((hex(substr($_, 0, 2))) >> $BBxoff0x*1);
I find that hex(substr($_, 0, 2)) produces an ASCII representation of
a byte value in decimal.
The sub-routine ByteOf() reads:
sub ByteOf($)
{
return pack("c", $_[0]);
}
The error appears to be produced by this sub-routine whenever the
value passed (in ASCII) is greater than 127.
As this is the first time I have looked in any detail at Perl code,
I'm a bit flummoxed.
Can somebody tell me what could be causing the problem, and how to get
round it?
David
--
David Sumbler
More information about the Programming
mailing list