all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#42007: ps-print encodes post-ASCII Unicode incorrectly for common characters
@ 2020-06-22 16:47 James P. Ascher via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2020-06-22 18:05 ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: James P. Ascher via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2020-06-22 16:47 UTC (permalink / raw)
  To: 42007, viniciusjl

I'd like to use ps-print to print hard copies of emails from my
colleagues, but it fails for certain common Unicode characters beyond
the basic ASCII, rendering them as '?'.

MINIMAL EXAMPLE:

1. New buffer with "What’s up?—Dude."
2. Call C-u M-x ps-print-buffer and save as test.ps
3. The line in question PostScript code reads:

(What?s up??Dude.) S

which renders:

"What?s up??Dude."

It should render "What’s up?—Dude."


DISCUSSION:

This fails for emoji and most of the hello file as well, but that's not
really what I'm after.  In trying to debug this, I made a little
progress.  In ps-print.el, `ps-output-string-prim` seems to be designed
to handle these, however:

(ps-output-string-prim "What’s up?—Dude.")

gives

(What\3FFFE2\3FFF80\3FFF99s up?\3FFFE2\3FFF80\3FFF94Dude.)

Putting that string in the PostScript file doesn't work quite right
either: it drops the back slash. So I think there are two bugs here:

Bug 1: Post-ASCII Unicode encodes as '?' instead of "\number"
Bug 2: Post-ASCII Unicode should be encoded so at least Ghostscript can
handle it.

Ghostscript supports post-ASCII Unicode:
https://ghostscript.com/doc/9.52/Use.htm#UnicodeTT

But, I don't know if such behavior is standard PostScript.  I also don't
know if there's a more obvious solution.

Respectfully submitted,
-James

-- 
James P. Ascher
Doctoral Student, English Department
University of Virginia






^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-12-07 18:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-22 16:47 bug#42007: ps-print encodes post-ASCII Unicode incorrectly for common characters James P. Ascher via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-06-22 18:05 ` Eli Zaretskii
2020-06-22 19:11   ` James P. Ascher via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-07 16:08   ` Peter Münster
2021-12-07 16:54     ` Eli Zaretskii
2021-12-07 18:40       ` Peter Münster

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.