#!/usr/local/bin/perl

while(<>)
{
    $S=$1 if /^STARTCHAR\s+(.+)/;
    open(STDOUT,">>$E") && print "$S\n" if ($E) = /^ENCODING\s+(\d+)/;
    next unless /^BITMAP/;
    while (<>)
    {
	last if /^ENDCHAR/;
	s/^([0-9A-F]+)$/unpack("B*",pack("H*",$1))/gei;
	y/01/-#/; print;
    }
}
