From owner-freebsd-current@FreeBSD.ORG Sun Oct 5 18:01:29 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 445EEE51 for ; Sun, 5 Oct 2014 18:01:29 +0000 (UTC) Received: from sam.nabble.com (sam.nabble.com [216.139.236.26]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 26CEB6D4 for ; Sun, 5 Oct 2014 18:01:28 +0000 (UTC) Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1XapoV-0006kk-2j for freebsd-current@freebsd.org; Sun, 05 Oct 2014 10:41:43 -0700 Date: Sun, 5 Oct 2014 10:41:43 -0700 (PDT) From: Beeblebrox To: freebsd-current@freebsd.org Message-ID: <1412530903064-5954561.post@n5.nabble.com> Subject: printing text file with LPD - non-printable characters MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Oct 2014 18:01:29 -0000 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.