From: Eli Zaretskii <eliz@gnu.org>
To: Uwe Brauer <oub@mat.ucm.es>
Cc: emacs-devel@gnu.org
Subject: Re: possible bug in quoted-printable-decode region
Date: Thu, 28 Jun 2018 16:14:11 +0300 [thread overview]
Message-ID: <83efgroxy4.fsf@gnu.org> (raw)
In-Reply-To: <87a7rf9jkb.fsf@mat.ucm.es> (message from Uwe Brauer on Thu, 28 Jun 2018 14:33:56 +0200)
> From: Uwe Brauer <oub@mat.ucm.es>
> 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).
next prev parent reply other threads:[~2018-06-28 13:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-27 8:09 possible bug in quoted-printable-decode region Uwe Brauer
2018-06-27 8:40 ` Yuri Khan
2018-06-28 12:33 ` Uwe Brauer
2018-06-28 13:14 ` Eli Zaretskii [this message]
2018-06-28 14:18 ` Uwe Brauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83efgroxy4.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=oub@mat.ucm.es \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).