From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Thread: fa528,d90c32ea45aaa9f6 X-Google-Attributes: gidfa528,public X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news3.google.com!news.glorb.com!newsgate.cistron.nl!skynet.be!newspost001!tjb!not-for-mail From: "ECS" Newsgroups: comp.unix.tru64 References: <42c14470$0$341$ba620e4c@news.skynet.be><20050628144115.3cfb1c62.jasper@nedlinux.nl><42c28d87$0$18117$ba620e4c@news.skynet.be><42c4d2e9$0$24317$ba620e4c@news.skynet.be> <20050701101610.2a7f2fa1.jasper@nedlinux.nl> Subject: Re: printing: character translation Date: Mon, 4 Jul 2005 07:42:27 +0200 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2527 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 X-RFC2646: Format=Flowed; Original Message-ID: <42c8cb47$0$24267$ba620e4c@news.skynet.be> Organization: -= Belgacom Usenet Service =- NNTP-Posting-Host: c4fd947b.news.skynet.be X-Trace: 1120455495 news.skynet.be 24267 194.78.171.203:31006 X-Complaints-To: usenet-abuse@skynet.be Xref: g2news1.google.com comp.unix.tru64:785 Jasper, as requested: ------------------------------------------------------------------- # "print German" script on Citizen CLP-7202e from BaaN IVc4 ------------------------------------------------------------------- # parameters: # $1 - Filename # TMPFILE=/usr/baanc4/bse/tmp/dachtmp cat $1 > $TMPFILE /usr/bin/germtrans.perl $TMPFILE | /usr/bin/lpr -h -Pdach ------------------------------------------------------------------- germtrans.perl ------------------------------------------------------------------- #!/usr/bin/perl # # change all occurances of a string in a file to another string # if ($#ARGV != 0) { print "usage: chstring file \n"; exit; } $oldfile = $ARGV[0]; open(OF, $oldfile); # read in each line of the file while ($line = ) { $line =~ s/�/Oe/; $line =~ s/�/Ae/; $line =~ s/�/Ue/; $line =~ s/�/oe/; $line =~ s/�/ae/; $line =~ s/�/ue/; $line =~ s/�/ss/; print $line; } close(OF); ------------------------------------------------------------------- Regards, Daniel "J. Lievisse Adriaanse" schreef in bericht news:20050701101610.2a7f2fa1.jasper@nedlinux.nl... I just gave the idea, but may I see your script? Jasper On Fri, 1 Jul 2005 07:25:55 +0200 "ECS" wrote: > Thanks, it's working > > "ECS" schreef in bericht > news:42c28d87$0$18117$ba620e4c@news.skynet.be... > > Thanks for replying. > > > > Perl is on the system, do you have an example (I don't know Perl)? > > > > Daniel > > > > "J. Lievisse Adriaanse" schreef in bericht > > news:20050628144115.3cfb1c62.jasper@nedlinux.nl... > > Hello, > > > > perhaps you can write a wrapper in Perl, since Perl is perfect for > > regular > > expressions like the one you're trying to let lpr do. > > > > Jasper > > > > On Tue, 28 Jun 2005 14:41:11 +0200 > > "ECS" wrote: > > > >> Hi, > >> > >> I'm using lpr to print. However some of the documents contain German > >> characters which are skipped (or replaced) by the printer. > >> Selecting another font can not be done so I need to translate them e.g. > >> character o combined with � (�) should be translated to oe. > >> > >> Can this be done using lpr? > >> > >> TIA > >> > >> > > > > > > > >