unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#35355: 27.0.50; ps-print-buffer-with-faces does not print non-ascii
@ 2019-04-21  9:02 Jean-Christophe Helary
  2019-04-21  9:26 ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Jean-Christophe Helary @ 2019-04-21  9:02 UTC (permalink / raw)
  To: 35355


I tried to print a simple C buffer with some Japanese characters in commentsand the default printout was in b/w, but all the Japanese characters were printed out nicely.

Then, I tried the ps-print-buffer-with-faces command and the syntax highlighting worked fine but all the Japanese characters were replaced by ???.

Then, after reading the documentation a bit, I tried to
(setq ps−multibyte−buffer ’non−latin−printer)

but now the Japanese characters are totally mojibaked:
// $*$_$/$8$NFbMF0lMw

so I tried 'bfd-fonts and I got a weird message about having no font for
ascii, and with 'bfd-fonts-except-latin, I'm back to ???.

I tried the same with an elisp file and the result was the same.

A minor issue is that the first line of the header for the ps file seems
truncated. Only the path and the date are printed.



In GNU Emacs 27.0.50 (build 2, x86_64-apple-darwin18.5.0, NS appkit-1671.40 Version 10.14.4 (Build 18E226))
of 2019-04-16 built on mabinogion.local
Repository revision: debaa72dd89eee0dffc930a7ccff742ca5a81d88
Repository branch: master
Windowing system distributor 'Apple', version 10.3.1671
System Description:  Mac OS X 10.14.4

Formatting...  0%
Collecting face information...
Formatting...done
Saving...
Wrote /Users/suzume/Desktop/test.ps [2 times]
Quit

Configured using:
'configure LDFLAGS=-L/usr/local/opt/texinfo/lib
PKG_CONFIG_PATH=/usr/local/Cellar/pkg-config'

Configured features:
DBUS NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS XIM NS
THREADS JSON PDUMPER LCMS2 GMP

Important settings:
 value of $LANG: en_JP.UTF-8
 locale-coding-system: utf-8

Major mode: Emacs-Lisp

Minor modes in effect:
 global-display-line-numbers-mode: t
 display-line-numbers-mode: t
 whitespace-mode: t
 flyspell-mode: t
 rainbow-delimiters-mode: t
 electric-pair-mode: t
 global-color-identifiers-mode: t
 color-identifiers-mode: t
 global-git-gutter+-mode: t
 global-git-commit-mode: t
 async-bytecomp-package-mode: t
 shell-dirtrack-mode: t
 ivy-mode: t
 global-company-mode: t
 company-mode: t
 projectile-mode: t
 recentf-mode: t
 server-mode: t
 icomplete-mode: t
 delete-selection-mode: t
 savehist-mode: t
 desktop-save-mode: t
 tooltip-mode: t
 global-eldoc-mode: t
 eldoc-mode: t
 electric-indent-mode: t
 mouse-wheel-mode: t
 file-name-shadow-mode: t
 global-font-lock-mode: t
 font-lock-mode: t
 blink-cursor-mode: t
 auto-composition-mode: t
 auto-encryption-mode: t
 auto-compression-mode: t
 size-indication-mode: t
 line-number-mode: t
 global-visual-line-mode: 1
 transient-mark-mode: t

Load-path shadows:
/Users/suzume/.emacs.d/elpa/svg-0.2/svg hides /Users/suzume/Documents/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/svg

Features:
(shadow mail-extr emacsbug sendmail ps-mule ps-print ps-print-loaddefs
ps-def lpr reporter display-line-numbers sort whitespace osx-dictionary
mm-archive misearch multi-isearch gnutls network-stream url-http url-gw
nsm url-cache url-auth finder-inf smex ido helpful trace edebug
backtrace info-look shut-up f dash-functional help-fns radix-tree
elisp-refs s loop tabify org-datetree org-capture texinfo autorevert
filenotify vc-dispatcher vc-svn add-node-modules-path vc-git diff-mode
mhtml-mode js2-mode css-mode eww mm-url gnus nnheader url-queue url
url-proxy url-privacy url-expand url-methods url-history url-cookie
url-domsuf url-util mailcap shr svg xml browse-url js cc-mode cc-fonts
cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs
sgml-mode dom writeroom-mode visual-fill-column org-indent org-element
avl-tree org org-macro org-footnote org-pcomplete org-list org-faces
org-entities noutline outline org-version ob-emacs-lisp ob ob-tangle
org-src ob-ref ob-lob ob-table ob-keys ob-exp ob-comint ob-core ob-eval
org-compat org-macs org-loaddefs cal-menu calendar cal-loaddefs flyspell
ispell rainbow-delimiters elec-pair persistent-soft list-utils pcache
eieio-compat eieio-base font-utils color-identifiers-mode python
tramp-sh rubocop rinari jump inflections findr ruby-compilation
which-func imenu inf-ruby ruby-mode smie git-gutter+ git-commit
with-editor magit-git magit-section magit-utils magit-popup
async-bytecomp async crm log-edit easy-mmode message rmc puny dired
dired-loaddefs rfc822 mml mml-sec epa derived epg gnus-util rmail
rmail-loaddefs text-property-search time-date mm-decode mm-bodies
mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums
mail-prsvr mailabbrev mail-utils gmm-utils mailheader pcvs-util add-log
tramp tramp-loaddefs trampver tramp-integration files-x tramp-compat
shell pcomplete parse-time flycheck cl-extra find-func help-mode rx dash
ivy colir color ivy-overlay ffap company-oddmuse company-keywords
company-etags etags fileloop generator xref project company-gtags
company-dabbrev-code company-dabbrev company-files company-capf
company-cmake company-xcode company-clang company-semantic company-eclim
company-template company-bbdb company pcase projectile grep ibuf-ext
ibuffer ibuffer-loaddefs thingatpt web-mode disp-table pdf-tools compile
comint ansi-color ring cus-edit cus-start cus-load pdf-view bookmark pp
jka-compr pdf-cache pdf-info tq pdf-util advice format-spec image-mode
ls-lisp recentf tree-widget wid-edit server exec-path-from-shell
icomplete unicode-fonts delsel savehist desktop frameset edmacro kmacro
cl info package easymenu epg-config url-handlers url-parse auth-source
cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json
subr-x map url-vars seq byte-opt gv bytecomp byte-compile cconv
cl-loaddefs cl-lib tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/ns-win ns-win ucs-normalize mule-util
term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads dbusbind kqueue cocoa ns lcms2 multi-tty
make-network-process emacs)

Memory information:
((conses 16 1633272 170441)
(symbols 48 43284 3)
(strings 32 246856 85216)
(string-bytes 1 6574376)
(vectors 16 79760)
(vector-slots 8 1698327 143454)
(floats 8 677 262)
(intervals 56 184703 1323)
(buffers 992 58))


Jean-Christophe Helary
-----------------------------------------------
http://mac4translators.blogspot.com @brandelune







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

* bug#35355: 27.0.50; ps-print-buffer-with-faces does not print non-ascii
  2019-04-21  9:02 bug#35355: 27.0.50; ps-print-buffer-with-faces does not print non-ascii Jean-Christophe Helary
@ 2019-04-21  9:26 ` Eli Zaretskii
  2019-04-29  4:02   ` handa
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2019-04-21  9:26 UTC (permalink / raw)
  To: Jean-Christophe Helary, Kenichi Handa; +Cc: 35355

> From: Jean-Christophe Helary <brandelune@gmail.com>
> Date: Sun, 21 Apr 2019 18:02:38 +0900
> 
> 
> I tried to print a simple C buffer with some Japanese characters in commentsand the default printout was in b/w, but all the Japanese characters were printed out nicely.
> 
> Then, I tried the ps-print-buffer-with-faces command and the syntax highlighting worked fine but all the Japanese characters were replaced by ???.
> 
> Then, after reading the documentation a bit, I tried to
> (setq ps−multibyte−buffer ’non−latin−printer)
> 
> but now the Japanese characters are totally mojibaked:
> // $*$_$/$8$NFbMF0lMw
> 
> so I tried 'bfd-fonts and I got a weird message about having no font for
> ascii, and with 'bfd-fonts-except-latin, I'm back to ???.
> 
> I tried the same with an elisp file and the result was the same.
> 
> A minor issue is that the first line of the header for the ps file seems
> truncated. Only the path and the date are printed.

Thanks, I hope Handa-san (CC'ed) could comment on this.





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

* bug#35355: 27.0.50; ps-print-buffer-with-faces does not print non-ascii
  2019-04-21  9:26 ` Eli Zaretskii
@ 2019-04-29  4:02   ` handa
  2019-04-29 13:22     ` Jean-Christophe Helary
  0 siblings, 1 reply; 7+ messages in thread
From: handa @ 2019-04-29  4:02 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 35355, brandelune

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

In article <83bm0zaeui.fsf@gnu.org>, Eli Zaretskii <eliz@gnu.org> writes:

> > From: Jean-Christophe Helary <brandelune@gmail.com>
> > Date: Sun, 21 Apr 2019 18:02:38 +0900
> > 
> > I tried to print a simple C buffer with some Japanese characters in commentsand the default printout was in b/w, but all the Japanese characters were printed out nicely.
> > 
> > Then, I tried the ps-print-buffer-with-faces command and the syntax highlighting worked fine but all the Japanese characters were replaced by ???.
> > 
> > Then, after reading the documentation a bit, I tried to
> > (setq ps−multibyte−buffer ’non−latin−printer)
> > 
> > but now the Japanese characters are totally mojibaked:
> > // $*$_$/$8$NFbMF0lMw

I can't reproduce that problem.  The attached are the sample text file
and the PS file produced by C-u M-x ps-print-buffer with
ps-multibyte-buffer being set to non-latin-printer in my environment
(emacs vesion is 27.0.50).

Please send me the PS file generated from the attached temp.txt in your
environment.

---
K. Handa
handa@gnu.org


[-- Attachment #2: temp.txt --]
[-- Type: text/plain, Size: 36 bytes --]

English 英語
Japanese 日本語

[-- Attachment #3: temp.ps --]
[-- Type: application/postscript, Size: 34709 bytes --]

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

* bug#35355: 27.0.50; ps-print-buffer-with-faces does not print non-ascii
  2019-04-29  4:02   ` handa
@ 2019-04-29 13:22     ` Jean-Christophe Helary
  2019-04-29 15:08       ` Eli Zaretskii
  2019-05-01  9:29       ` handa
  0 siblings, 2 replies; 7+ messages in thread
From: Jean-Christophe Helary @ 2019-04-29 13:22 UTC (permalink / raw)
  To: handa; +Cc: 35355

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

Thank you Kenichi for checking.

I couldn't find a temp.txt file attached to your mail but the ps file had issues with the available fonts on my machine.

Jean-Christophe 



Jean-Christophe 

> On Apr 29, 2019, at 13:02, handa <handa@gnu.org> wrote:
> 
> In article <83bm0zaeui.fsf@gnu.org>, Eli Zaretskii <eliz@gnu.org> writes:
> 
>>> From: Jean-Christophe Helary <brandelune@gmail.com>
>>> Date: Sun, 21 Apr 2019 18:02:38 +0900
>>> 
>>> I tried to print a simple C buffer with some Japanese characters in commentsand the default printout was in b/w, but all the Japanese characters were printed out nicely.
>>> 
>>> Then, I tried the ps-print-buffer-with-faces command and the syntax highlighting worked fine but all the Japanese characters were replaced by ???.
>>> 
>>> Then, after reading the documentation a bit, I tried to
>>> (setq ps−multibyte−buffer ’non−latin−printer)
>>> 
>>> but now the Japanese characters are totally mojibaked:
>>> // $*$_$/$8$NFbMF0lMw
> 
> I can't reproduce that problem.  The attached are the sample text file
> and the PS file produced by C-u M-x ps-print-buffer with
> ps-multibyte-buffer being set to non-latin-printer in my environment
> (emacs vesion is 27.0.50).
> 
> Please send me the PS file generated from the attached temp.txt in your
> environment.
> 
> ---
> K. Handa
> handa@gnu.org
> 
> English 英語
> Japanese 日本語
> <temp.ps>

Jean-Christophe Helary
-----------------------------------------------
http://mac4translators.blogspot.com @brandelune



[-- Attachment #2.1: Type: text/html, Size: 4123 bytes --]

[-- Attachment #2.2: Screen Shot 2019-04-29 at 22.19.52.png --]
[-- Type: image/png, Size: 110041 bytes --]

[-- Attachment #2.3: Screen Shot 2019-04-29 at 22.20.07.png --]
[-- Type: image/png, Size: 27753 bytes --]

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

* bug#35355: 27.0.50; ps-print-buffer-with-faces does not print non-ascii
  2019-04-29 13:22     ` Jean-Christophe Helary
@ 2019-04-29 15:08       ` Eli Zaretskii
  2019-04-29 15:50         ` Jean-Christophe Helary
  2019-05-01  9:29       ` handa
  1 sibling, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2019-04-29 15:08 UTC (permalink / raw)
  To: Jean-Christophe Helary; +Cc: 35355

> From: Jean-Christophe Helary <brandelune@gmail.com>
> Date: Mon, 29 Apr 2019 22:22:02 +0900
> Cc: Eli Zaretskii <eliz@gnu.org>,
>  35355@debbugs.gnu.org
> 
> I couldn't find a temp.txt file attached to your mail but the ps file had issues with the available fonts on my machine.

Handa-san sent a test.ps file, not temp.txt.  You should be able to
find it here:

  https://debbugs.gnu.org/cgi/bugreport.cgi?bug=35355#11






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

* bug#35355: 27.0.50; ps-print-buffer-with-faces does not print non-ascii
  2019-04-29 15:08       ` Eli Zaretskii
@ 2019-04-29 15:50         ` Jean-Christophe Helary
  0 siblings, 0 replies; 7+ messages in thread
From: Jean-Christophe Helary @ 2019-04-29 15:50 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 35355

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

Here is my output.

Jean-Christophe 


[-- Attachment #2: test2.ps --]
[-- Type: application/postscript, Size: 34659 bytes --]

[-- Attachment #3: Type: text/plain, Size: 520 bytes --]



> On Apr 30, 2019, at 0:08, Eli Zaretskii <eliz@gnu.org> wrote:
> 
>> From: Jean-Christophe Helary <brandelune@gmail.com>
>> Date: Mon, 29 Apr 2019 22:22:02 +0900
>> Cc: Eli Zaretskii <eliz@gnu.org>,
>> 35355@debbugs.gnu.org
>> 
>> I couldn't find a temp.txt file attached to your mail but the ps file had issues with the available fonts on my machine.
> 
> Handa-san sent a test.ps file, not temp.txt.  You should be able to
> find it here:
> 
>  https://debbugs.gnu.org/cgi/bugreport.cgi?bug=35355#11

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

* bug#35355: 27.0.50; ps-print-buffer-with-faces does not print non-ascii
  2019-04-29 13:22     ` Jean-Christophe Helary
  2019-04-29 15:08       ` Eli Zaretskii
@ 2019-05-01  9:29       ` handa
  1 sibling, 0 replies; 7+ messages in thread
From: handa @ 2019-05-01  9:29 UTC (permalink / raw)
  To: Jean-Christophe Helary; +Cc: 35355

In article <08C032B8-3750-442F-9F6D-3289B6723AED@gmail.com>, Jean-Christophe Helary <brandelune@gmail.com> writes:

> Thank you Kenichi for checking.

> I couldn't find a temp.txt file attached to your mail but

It seems that temp.txt was attached as desposition:inline.  Here's the
contents.
------------------------------------------------------------
English 英語
Japanese 日本語
------------------------------------------------------------

>  the ps file had issues with the available fonts on my machine.

That PS file uses the font /Ryumin-Light-H.  Do you mean that you
machine does not have that font?

As the docstring of ps-multibyte-buffer says, non-latin-printer is
usable only when you have Japanese or Korean capable PostScript
printer/viewer.

In article <3B06C809-1EAA-4A1E-8F07-F880AE34A0EE@gmail.com>, Jean-Christophe Helary <brandelune@gmail.com> writes:

> Here is my output.

With what ps-multibyte-buffer value did you produce it?

---
K. Handa
handa@gnu.org





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

end of thread, other threads:[~2019-05-01  9:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-21  9:02 bug#35355: 27.0.50; ps-print-buffer-with-faces does not print non-ascii Jean-Christophe Helary
2019-04-21  9:26 ` Eli Zaretskii
2019-04-29  4:02   ` handa
2019-04-29 13:22     ` Jean-Christophe Helary
2019-04-29 15:08       ` Eli Zaretskii
2019-04-29 15:50         ` Jean-Christophe Helary
2019-05-01  9:29       ` handa

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).