GNU bug report logs - #73846
[PATCH] Make djvused emit UTF-8 encoded text

Previous Next

Package: emacs;

Reported by: Visuwesh <visuweshm <at> gmail.com>

Date: Thu, 17 Oct 2024 04:16:02 UTC

Severity: normal

Tags: patch

Done: Tassilo Horn <tsdh <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Visuwesh <visuweshm <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: tsdh <at> gnu.org, 73846 <at> debbugs.gnu.org
Subject: bug#73846: [PATCH] Make djvused emit UTF-8 encoded text
Date: Thu, 17 Oct 2024 14:01:56 +0530
[Message part 1 (text/plain, inline)]
[வியாழன் அக்டோபர் 17, 2024] Eli Zaretskii wrote:

>> Cc: "Tassilo Horn" <tsdh <at> gnu.org>
>> From: Visuwesh <visuweshm <at> gmail.com>
>> Date: Thu, 17 Oct 2024 09:42:30 +0530
>> 
>> 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.
>
> If you force djvused to emit UTF-8 encoded text, you need to bind
> coding-system-for-read to 'utf-8, to make sure Emacs decodes that
> correctly.  I'm guessing your locale uses UTF-8 by default, which is
> why it worked for you.

My locale is a UTF-8 one indeed.  I've now let bound
coding-system-for-read around everything inside with-temp-buffer.

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

> Thanks.

[0001-Make-djvused-emit-UTF-8-encoded-text.patch (text/x-diff, attachment)]

This bug report was last modified 213 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.