From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Penton Newsgroups: gmane.emacs.help Subject: Re: ps-print question Date: Thu, 6 Jan 2011 22:56:08 -0500 Message-ID: <00C210D4-0141-4429-939B-7CAAE6C9A671@arqux.com> References: <9E47A63C-3337-4CF9-AC0E-C91082557375@arqux.com> <97BBE33A-D586-4CFA-BE9C-96C6ABBD22A3@Web.DE> <63E6A495-DFCF-4791-B39A-9B9893228275@Freenet.DE> <47A0F9E5-9581-4484-99DA-71B1D2E54DF2@arqux.com> <5B72ACF7-0ACA-4DC9-A49F-98AA1DF0B504@arqux.com> <8A0622C4-69A5-4BC0-861F-66CE369EBF68@Web.DE> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1294373361 15492 80.91.229.12 (7 Jan 2011 04:09:21 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 7 Jan 2011 04:09:21 +0000 (UTC) Cc: GNU Emacs List To: Peter Dyballa Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jan 07 05:09:17 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Pb3dd-0005NM-1t for geh-help-gnu-emacs@m.gmane.org; Fri, 07 Jan 2011 05:09:17 +0100 Original-Received: from localhost ([127.0.0.1]:60503 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pb3RM-0003ts-TZ for geh-help-gnu-emacs@m.gmane.org; Thu, 06 Jan 2011 22:56:36 -0500 Original-Received: from [140.186.70.92] (port=36462 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pb3R0-0003tm-IJ for help-gnu-emacs@gnu.org; Thu, 06 Jan 2011 22:56:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pb3Qz-0007Sf-Dc for help-gnu-emacs@gnu.org; Thu, 06 Jan 2011 22:56:14 -0500 Original-Received: from smtp.cogeco.net ([216.221.81.25]:51622 helo=fipsb03.cogeco.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pb3Qz-0007SV-Am for help-gnu-emacs@gnu.org; Thu, 06 Jan 2011 22:56:13 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApEBADEdJk0Y4iwk/2dsb2JhbAAM4gGFTASEZ4Yi X-IronPort-AV: E=Sophos;i="4.60,286,1291611600"; d="scan'208";a="227171882" Original-Received: from d226-44-36.home.cgocable.net (HELO [10.0.1.5]) ([24.226.44.36]) by fipsb03.cogeco.net with ESMTP; 06 Jan 2011 22:56:09 -0500 In-Reply-To: X-Mailer: Apple Mail (2.1082) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:78277 Archived-At: On 2011-01-04, at 7:20 PM, Peter Dyballa wrote: > Dave, >=20 > I have an answer from Ghostscript/Artifex. It points to footnote in = PRML, the PostScript Language Reference > Manual (see p785 of the 3rd edition): >=20 > 3. The ISOLatin1Encoding encoding vector deviates from the ISO = 8859-1 standard in one > respect: the character at position 140 is quoteleft, whereas = the ISO standard specifies > grave. A PostScript program needing to conform exactly to the = ISO standard should > create a modified encoding vector with this entry changed. >=20 > So what is displayed in the buffer as >=20 > character: ` (96, #o140, #x60) >=20 > is in reality, printed on some medium or on screen >=20 > character: =91 (8216, #o20030, #x2018) >=20 > or: instead of /grave the character /quoteleft is encoded here. >=20 >=20 > You can try yourself to open the PS file (any with a `) without any = precautions and it will be Unicode or ISO Latin, maybe some ASCII. In a = second buffer open the same file=96actually a copy, because I don't = think that GNU Emacs can display the same file in two different = encodings=96in adobe-standard-encoding. To do so start with: >=20 > C-x RET c adobe-standard-encoding RET v >=20 > I assume you are in dired-mode and the text cursor is on the copy. = Otherwise you have to use C-x f. Now notice the difference! >=20 >=20 > I think of continuing the conversation with the Ghostscript folks = (extending to PDF), and I also sent a bug report to the GNU Emacs = developers because PS files are *not* opened in a PostScript but some = text encoding. With the consequence that folks like you and me think a ` = is a ` while it's a =91... Peter: Yes, I discovered that several days ago. You are correct that the = problem is with the encoding vector. But there is no bug that anyone is = likely to fix anytime soon.=20 The issue is not related to the encoding of the postscript file. In = order to understand this, you must understand what postscript font = encoding vectors are. And, as I indicated to you several posts ago, the = "problem" is indeed in the postscript generated by ps-print. The = ps-print code generates postscript that intentionally replaces the = font's encoding vector with the ISOLatin1 encoding vector, which does = the "wrong thing" with the grave character. I suggest that you do a bit of reading in PRML to understand what a font = encoding vector is. Once you do you will see that the encoding of the ps = file is not really the problem, although it is possible to get the grave = to print by textually replacing the grave with the string \221 = everywhere. The ISOLatin1 encoding puts grave at #o221. I have done my own fix for now, by altering the postscript generated by = ps-print. My fix involves changing the font encoding vector at octal 140 = to map it onto the grave character. So I don't care whether anyone fixes = it. I suspect that this issue has been known for a long time. - Dave -