Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 5 Oct 2014 10:41:43 -0700 (PDT)
From:      Beeblebrox <zaphod@berentweb.com>
To:        freebsd-current@freebsd.org
Subject:   printing text file with LPD - non-printable characters
Message-ID:  <1412530903064-5954561.post@n5.nabble.com>

next in thread | raw e-mail | index | archive | help
I have two LPD errors
1. I see two characters being replaced by strings on the hard copy (the {=
=C3=A2}
below is an {a^}). This happens on the first page and not on following
pages.
instead of " I get:  =C3=A2\200\234 (235 for trailing ")
instead of ' I get:  =C3=A2\200\231
2. All non-english characters get garbled, on all pages. These are
characters like =C3=A7, =C3=B6, etc.

With these two seemingly separate errors, I can't figure out whether this i=
s
an lpr or enscript error.

* The file being sent through lpr is a simple text file.
* /etc/printcap entry for default printer is:
   lp|hp2100|HP 2100TN:\
   :rm=3D192.168.1.9:rp=3Draw:\
   :if=3D/usr/local/libexec/filters/psif:\
   :lf=3D/var/log/lpd-filter-errs:\
   :sd=3D/var/spool/lpd/hp2100:\
   :mx=3D0:sh:
* /var/log/lpd-filter-errs shows: [ 4 pages * 1 copy ] left in -  \  59
lines were wrapped  \  7 non-printable characters
* filetrs/psif is also very basic:
#!/bin/sh
IFS=3D"" read -r first_line
first_two_chars=3D`expr "$first_line" : '\(..\)'`
case "$first_two_chars" in
%!)
    # %! : PostScript job, print it.
    echo "$first_line" && cat && exit 0
    exit 2
    ;;
*)
    # otherwise, format with enscript
    ( echo "$first_line"; cat ) | /usr/local/bin/enscript -o - && exit 0
    exit 2
    ;;
esac




-----
FreeBSD-11-current_amd64_root-on-zfs_RadeonKMS
--
View this message in context: http://freebsd.1045724.n5.nabble.com/printing=
-text-file-with-LPD-non-printable-characters-tp5954561.html
Sent from the freebsd-current mailing list archive at Nabble.com.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1412530903064-5954561.post>