emacs-devel
[Top][All Lists]
Advanced

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

Re: Fixing Gnus, and string encoding question


From: Noam Postavsky
Subject: Re: Fixing Gnus, and string encoding question
Date: Sun, 7 Apr 2019 07:59:09 -0400

On Sun, 7 Apr 2019 at 00:10, Eric Abrahamsen <address@hidden> wrote:

> You can get the string I'm fighting with by saving the attached file and
> running:
>
> (with-temp-buffer
>   (set-buffer-multibyte t)
>   (let ((coding-system-for-read 'raw-text))
>     (insert-file-contents "active")
>     (goto-char (point-min))
>     (symbol-name (read (current-buffer)))))
>
> I'm trying to turn that into something that looks like
> "nnml:ã\203\206ã\202¹ã\203\210"

Ah, needs multibyte-char-to-unibyte:

(apply #'string
       (mapcar #'multibyte-char-to-unibyte
               (with-temp-buffer
                 (set-buffer-multibyte t)
                 (let ((coding-system-for-read 'raw-text))
                   (insert-file-contents "active")
                   (goto-char (point-min))
                   (symbol-name (read (current-buffer)))))))



reply via email to

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