[Dorset] CUPS lpr and code pages

2011-05-25 Thread Tim Allen
Hi I'm using lpr to print out files generated by an ancient DOS program. I have a batch file that uses Cygwin OpenSSH to send to a printer: type %1 | ssh server lpr -PLaserjet Now the DOS program uses extended ASCII 09Ch for '£' symbols, now printing as little rectangles. I believe SSH is

Re: [Dorset] CUPS lpr and code pages

2011-05-25 Thread Tim Allen
On 25/05/11 09:35, Tim Allen wrote: Hi I'm using lpr to print out files generated by an ancient DOS program. I have a batch file that uses Cygwin OpenSSH to send to a printer: type %1 | ssh server lpr -PLaserjet Now the DOS program uses extended ASCII 09Ch for '£' symbols, now printing as

Re: [Dorset] CUPS lpr and code pages

2011-05-25 Thread John Carlyle-Clarke
On 25/05/11 09:35, Tim Allen wrote: Hi I'm using lpr to print out files generated by an ancient DOS program. I have a batch file that uses Cygwin OpenSSH to send to a printer: type %1 | ssh server lpr -PLaserjet Now the DOS program uses extended ASCII 09Ch for '£' symbols, now printing as

Re: [Dorset] CUPS lpr and code pages

2011-05-25 Thread Tim Allen
Hi John On 25/05/11 10:23, John Carlyle-Clarke wrote: On 25/05/11 09:35, Tim Allen wrote: Hi I'm using lpr to print out files generated by an ancient DOS program. I have a batch file that uses Cygwin OpenSSH to send to a printer: type %1 | ssh server lpr -PLaserjet Now the DOS program uses

Re: [Dorset] CUPS lpr and code pages

2011-05-25 Thread Ralph Corderoy
Hi John, I agree, iconv(1). VSpike wrote: type %1 | ssh server bash -c cat | iconv -f IBM850 -t UTF8 | lpr -PLaserjet Why the cat? ;-) $ dc -e 16i666F6F9C6261720AP | iconv -f ibm850 -t utf8 foo£bar $ It may be that CUPS lets one specify the incoming charset too but I didn't

Re: [Dorset] CUPS lpr and code pages

2011-05-25 Thread Tim Allen
Hi Ralph On 25/05/11 10:47, Ralph Corderoy wrote: Hi John, I agree, iconv(1). VSpike wrote: type %1 | ssh server bash -c cat | iconv -f IBM850 -t UTF8 | lpr -PLaserjet Why the cat? ;-) Going through SSH, it's not happy without it: C:\type JUNK.S0 | ssh server /bin/bash -c iconv -f

Re: [Dorset] CUPS lpr and code pages

2011-05-25 Thread Tim Allen
Hi Ralph On 25/05/11 12:16, Ralph Corderoy wrote: and -c takes just the next argument as the command to run, here tr. The following arguments are used to set the positional parameters, $1, $2, etc., which aren't used in this case. tr grumbles as seen above when run with no arguments. Since

Re: [Dorset] CUPS lpr and code pages

2011-05-25 Thread Ralph Corderoy
Hi, So bash sees an argv[] of bash -c tr f g and -c takes just the next argument as the command to run, here tr. The following arguments are used to set the positional parameters, $1, $2, etc., which aren't used in this case. I'm wrong there. They're used to set

Re: [Dorset] CUPS lpr and code pages

2011-05-25 Thread Tim Waugh
On Wed, 2011-05-25 at 10:47 +0100, Ralph Corderoy wrote: It may be that CUPS lets one specify the incoming charset too but I didn't see anything obvious. Locale environment variables perhaps? It used to be the case that you could specify it like this: lp -o