[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: configuring line printer



Quoting Sebastiaan (sebastia@ch.twi.tudelft.nl):

> I am trying to adapt text output to my Nec Pinwriter with MagicFilter. The
> manual from the printer tells me that the escape sequence 'ESC x0' will   
> set a different font to print with. So, I made a filter file with a line:
> 
> default                 cat     \01bx0  
> 
> because the ASCII code for escape is 27 (0x1b). However, it does not
> work. When I change the escape code to \033, everything works fine. But,  
> according to my ASCII table, 0x33 is the digit '3'. So why is this?
> I am also having difficulties with other escape sequences, like FS
> (0x1c) or SI (0x0f).

You're mixing together two ways of expressing characters: octal and
hex. For octal ESC, use \033, for hexadecimal use \x1b. The 0xff
construction is not used here.

Take a look at /etc/magicfilter/* for plenty of examples.

Cheers,

-- 
Email:  d.wright@open.ac.uk   Tel: +44 1908 653 739  Fax: +44 1908 655 151
Snail:  David Wright, Earth Science Dept., Milton Keynes, England, MK7 6AA
Disclaimer:   These addresses are only for reaching me, and do not signify
official stationery. Views expressed here are either my own or plagiarised.



Reply to: