rewrote pgm2unicode
rewrote pgm2unicode