emacs-devel
[Top][All Lists]
Advanced

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

Re: possible bug in quoted-printable-decode region


From: Eli Zaretskii
Subject: Re: possible bug in quoted-printable-decode region
Date: Thu, 28 Jun 2018 16:14:11 +0300

> From: Uwe Brauer <address@hidden>
> Date: Thu, 28 Jun 2018 14:33:56 +0200
> 
>    > quoted-printable-decode-region gives you a byte string. You are then
>    > supposed to decode that into text using whichever character encoding
>    > you know is used. (Quoted-printable encoding, unlike URL
>    > percent-encoding, does not mandate UTF-8. In RFC 2822 mail, the
>    > character encoding will be given in the Content-Type header’s charset=
>    > parameter. =C3=AD looks like a quoted-printable encoding of UTF-8
>    > encoding of the character U+00ED LATIN SMALL LETTER I WITH ACUTE.)
> 
>    > As a shortcut, you could pass the character encoding as the last
>    > argument to q-p-d-r, but that is described as deprecated in the
>    > docstring.
> 
> 
> Thanks, but now I am confused. I have that file, with 
>  Buenas d=C3=ADas:
> 
> How can I translate/decode that to latin1 or utf8? Or are you saying
> that this is not possible. 

It's possible: you should follow quoted-printable-decode-region with
decode-coding-region, and pass it a suitable coding-system.

> Still don't know what to do if the file had no mail header.

You will have to guess the encoding somehow.  Emacs cannot (and
shouldn't in this case).



reply via email to

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