unofficial mirror of bug-gnu-emacs@gnu.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

* bug#42007: ps-print encodes post-ASCII Unicode incorrectly for common characters
  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
  0 siblings, 2 replies; 6+ messages in thread
From: Eli Zaretskii @ 2020-06-22 18:05 UTC (permalink / raw)
  To: James P. Ascher; +Cc: 42007, viniciusjl

> Date: Mon, 22 Jun 2020 16:47:52 +0000
> From: "James P. Ascher" via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
> 
> 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."

I don't think ps-print supports non-ASCII characters beyond Latin-1,
definitely not unless you customize ps-mule and ps-bdf with
appropriate font.

Sorry.





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

* bug#42007: ps-print encodes post-ASCII Unicode incorrectly for common characters
  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
  1 sibling, 0 replies; 6+ messages in thread
From: James P. Ascher via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2020-06-22 19:11 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 42007, viniciusjl

> I don't think ps-print supports non-ASCII characters beyond Latin-1,
> definitely not unless you customize ps-mule and ps-bdf with
> appropriate font.
>
> Sorry.

No worries!  Knowing not to bang my head on that wall is
certainly progress.

Thanks for the quick response.






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

* bug#42007: ps-print encodes post-ASCII Unicode incorrectly for common characters
  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
  1 sibling, 1 reply; 6+ messages in thread
From: Peter Münster @ 2021-12-07 16:08 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: James P. Ascher, 42007, viniciusjl

On Mon, Jun 22 2020, Eli Zaretskii wrote:

> I don't think ps-print supports non-ASCII characters beyond Latin-1,
> definitely not unless you customize ps-mule and ps-bdf with
> appropriate font.

Hi,

Where could I find an example setup please? I.e. what font should be
used, that looks similar to the standard font used by ps-print and that
supports at least latin-9 characters like the €-symbol? And how should
ps-mule be set up to use that font?

TIA for any pointers,
-- 
           Peter





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

* bug#42007: ps-print encodes post-ASCII Unicode incorrectly for common characters
  2021-12-07 16:08   ` Peter Münster
@ 2021-12-07 16:54     ` Eli Zaretskii
  2021-12-07 18:40       ` Peter Münster
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2021-12-07 16:54 UTC (permalink / raw)
  To: Peter Münster; +Cc: jpsa, 42007, viniciusjl

> From: Peter Münster <pm@a16n.net>
> Cc: "James P. Ascher" <jpsa@protonmail.com>,  42007@debbugs.gnu.org,
>   viniciusjl@ig.com.br
> Date: Tue, 07 Dec 2021 17:08:24 +0100
> 
> On Mon, Jun 22 2020, Eli Zaretskii wrote:
> 
> > I don't think ps-print supports non-ASCII characters beyond Latin-1,
> > definitely not unless you customize ps-mule and ps-bdf with
> > appropriate font.
> 
> Hi,
> 
> Where could I find an example setup please? I.e. what font should be
> used, that looks similar to the standard font used by ps-print and that
> supports at least latin-9 characters like the €-symbol? And how should
> ps-mule be set up to use that font?

The only source of documentation I know of are the commentaries at the
beginning of ps-mule.el and the sample settings there which provide
examples.





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

* bug#42007: ps-print encodes post-ASCII Unicode incorrectly for common characters
  2021-12-07 16:54     ` Eli Zaretskii
@ 2021-12-07 18:40       ` Peter Münster
  0 siblings, 0 replies; 6+ messages in thread
From: Peter Münster @ 2021-12-07 18:40 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: jpsa, 42007

[-- Attachment #1: Type: text/plain, Size: 276 bytes --]

On Tue, Dec 07 2021, Eli Zaretskii wrote:

> The only source of documentation I know of are the commentaries at the
> beginning of ps-mule.el and the sample settings there which provide
> examples.

Unfortunately the bdf-fonts are very ugly...

-- 
           Peter

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 211 bytes --]

^ 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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).