Subject: bug#73846: closed (Re: bug#73846: [PATCH] Make djvused emit UTF-8 encoded text)

From: [email-masked] (GNU bug Tracking System)
Date: Fri, 18 Oct 2024 06:09:02 +0000

Your bug report

#73846: [PATCH] Make djvused emit UTF-8 encoded text

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
73846: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=73846
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#73846: [PATCH] Make djvused emit UTF-8 encoded text
From: Tassilo Horn <[email-masked]>
To: Visuwesh <[email-masked]>
Cc: [email-masked], Eli Zaretskii <[email-masked]>
Date: Fri, 18 Oct 2024 08:07:51 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Visuwesh <[email-masked]> writes:

>> Please also add a comment there explaining what the -u switch does
>> and why we use it there.
>
> Done in attached patch, I hope it is clear.

It is.  Applied and pushed to master.

Thanks again,
  Tassilo

Subject: [PATCH] Make djvused emit UTF-8 encoded text
From: Visuwesh <[email-masked]>
To: [email-masked]
Date: Thu, 17 Oct 2024 09:42:30 +0530
List-Id: <debbugs-submit.debbugs.gnu.org>

Tags: patch

Hi Tassilo,

This is a small patch to make djvused emit UTF-8 encoded text.  In the
djvu test file that I sent you, outline in the appendix have non-ASCII
characters which are written as octal escapes.  Rather than unescaping
them on Emacs side, we can request djvused to use UTF-8 directly which
this patch does.  The attached patch does just that.

In GNU Emacs 31.0.50 (build 13, x86_64-pc-linux-gnu, X toolkit, cairo
 version 1.18.0, Xaw scroll bars) of 2024-10-06 built on astatine
Repository revision: 500f5da5fb62cd0bbded8df754d93e3147d1d847
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101011
System Description: Debian GNU/Linux trixie/sid

Configured using:
 'configure --with-sound=alsa --with-x-toolkit=lucid --without-xaw3d
 --without-gconf --without-libsystemd --with-cairo CFLAGS=-g3'
>From 8e21167c6e01ab76b76e15fa84bd198bc8df59b4 Mon Sep 17 00:00:00 2001
From: Visuwesh <[email-masked]>
Date: Thu, 17 Oct 2024 09:40:34 +0530
Subject: [PATCH] Make djvused emit UTF-8 encoded text

* lisp/doc-view.el (doc-view--djvu-outline): Pass -u to djvused
to make it emit UTF-8 encoded text rather than using octal
escapes for non-ASCII string.
---
 lisp/doc-view.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/doc-view.el b/lisp/doc-view.el
index bbfbbdec925..018c4eddd34 100644
--- a/lisp/doc-view.el
+++ b/lisp/doc-view.el
@@ -2027,7 +2027,7 @@ doc-view--djvu-outline
   (unless file-name (setq file-name (buffer-file-name)))
   (with-temp-buffer
     (call-process doc-view-djvused-program nil (current-buffer) nil
-                  "-e" "print-outline" file-name)
+                  "-u" "-e" "print-outline" file-name)
     (goto-char (point-min))
     (when (eobp)
       (setq doc-view--outline 'unavailable)
-- 
2.45.2