Usenet comp.unix.tru64 (2000-2013)
 help / color / mirror / Atom feed
From: "ECS" <zand@mailinator.com>
Subject: Re: printing: character translation
Date: Mon, 4 Jul 2005 07:42:27 +0200	[thread overview]
Message-ID: <42c8cb47$0$24267$ba620e4c@news.skynet.be> (raw)
In-Reply-To: 20050701101610.2a7f2fa1.jasper@nedlinux.nl

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2300 bytes --]

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 = <OF>) {
    $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" <jasper@nedlinux.nl> 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" <zand@mailinator.com> wrote:

> Thanks, it's working
>
> "ECS" <zand@mailinator.com> 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" <jasper@nedlinux.nl> 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" <zand@mailinator.com> 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
> >>
> >>
> >
> >
> >
>
>





      reply	other threads:[~2005-07-04  5:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-28 12:41 printing: character translation ECS
2005-06-28 12:41 ` J. Lievisse Adriaanse
2005-06-29 12:05   ` ECS
2005-07-01  5:25     ` ECS
2005-07-01  8:16       ` J. Lievisse Adriaanse
2005-07-04  5:42         ` ECS [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox