emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unicode problem with export of literal contents


From: Jens Lechtenboerger
Subject: Re: Unicode problem with export of literal contents
Date: Mon, 20 Feb 2023 11:16:24 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

On 2023-02-20, Bruno Barbier wrote:

> If you're always using utf-8, here is a way to force it so that
> secure-hash can compute the hash. This should work:
>
>    (with-temp-buffer
>       (let ((coding-system-for-write 'utf-8))
>         (insert "Lechtenb\303\266rger")
>         (secure-hash 'md5 (current-buffer))))

Yes, that works.

However, if I use insert-file-contents-literally with a unicode
file, I do *not* have to set the coding-system-for-write.  This just
works:

   (with-temp-buffer
      (insert-file-contents-literally "~/unicode.org")
      (secure-hash 'md5 (current-buffer)))

In the context of Org export, secure-hash seems to require a coding
system.  Why?

Best wishes
Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]