From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.devel Subject: Re: possible bug in quoted-printable-decode region Date: Wed, 27 Jun 2018 15:40:53 +0700 Message-ID: References: <87bmbwlkfs.fsf@mat.ucm.es> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1530088790 15526 195.159.176.226 (27 Jun 2018 08:39:50 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 27 Jun 2018 08:39:50 +0000 (UTC) To: Emacs developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 27 10:39:46 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fY5zK-0003sW-Mx for ged-emacs-devel@m.gmane.org; Wed, 27 Jun 2018 10:39:42 +0200 Original-Received: from localhost ([::1]:57395 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fY61R-0000Hz-R9 for ged-emacs-devel@m.gmane.org; Wed, 27 Jun 2018 04:41:53 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38368) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fY60h-0000Ht-Ph for emacs-devel@gnu.org; Wed, 27 Jun 2018 04:41:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fY60g-0005Ce-Nj for emacs-devel@gnu.org; Wed, 27 Jun 2018 04:41:07 -0400 Original-Received: from mail-oi0-x22c.google.com ([2607:f8b0:4003:c06::22c]:38903) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fY60g-0005C9-Hx for emacs-devel@gnu.org; Wed, 27 Jun 2018 04:41:06 -0400 Original-Received: by mail-oi0-x22c.google.com with SMTP id v8-v6so1114507oie.5 for ; Wed, 27 Jun 2018 01:41:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-transfer-encoding; bh=A5Jp5KCY6YBQwZpU2fXQgev4db6NJWrVISO+Ov5cM08=; b=EamzMkjZStKOlW7N2IzIjtWU4DHBysE8193e/FlBD3/CksIsA4vcP5El2Owx9Lm+s6 FyckcWdlWJeixhiLyyvQ0Q/3x6YOYw9w0HvD+C0u/y6ssiYHm6DvK0/ANgenBpXaIpWz AqAye8/UcYGEQ52I5oPijIT+EpCsbYILcxBRo7Q/sJUmhhUTRfWD6rgwVCgkx+IXalaY 7PAAvWvEFT+EZtzPTDrbKHEHHAq7kbYaL4Glw3xJqMe4WgLRxEwQw2EiOnzehvgbqEek pfvaVZl0HU1mWCa+wMK5wVvQHI6SCxVx5u8nvB8fN+NBrUNp/jEGRTSp4fXlVZ+I+1C5 OJZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:content-transfer-encoding; bh=A5Jp5KCY6YBQwZpU2fXQgev4db6NJWrVISO+Ov5cM08=; b=MQ2VFrWFUbxFvpsH40tBD8nI52+cU3WMr8f8w/7DcpHRGUbAPZIurR1/AfgeU6+TDn efM+iW5vXvk3akTrflYtAIUDlJeVqM0qcsybM5fQxOlCaBZE7d1KLO0wiDqfzyVy1ewi SdAcVHLcuUvxdxGPjQQtnDPKzMySMylHPaxincVmKGetRCLRGSuhjdqcig7hKKUW2ED+ PwgEJCScO1OV1z+5Ec7PCck1oBWISwcRwHVxjcuF4uHqMB15ZS6c1kSzrxNR0KCg9TFZ LG6YKoDP3OfIFbWg9T7AXbiHrv3LpQlKmXGJ1yKXgFoDQVAC2yXbor8bfMGHwwdJBNb0 24Xw== X-Gm-Message-State: APt69E3LaSqIazc6xOao2YqTs0HI9mojuUtm6gD2N6TAC1ZV6Q3oXj0X Tkp2Xm0VDIWrXk5zTPKsRIrVOtlWW1ZpimsHGHM= X-Google-Smtp-Source: AAOMgpcEJAMLw0VJZ9s/eLDl1jiiax8ZbI8Y2TgZKtfn5m2wE4SZ2O0dLR3gdgSp0F4S2GIpb5gV+bsXqNbo7mqYDqw= X-Received: by 2002:aca:e5d2:: with SMTP id c201-v6mr2872165oih.191.1530088864638; Wed, 27 Jun 2018 01:41:04 -0700 (PDT) In-Reply-To: <87bmbwlkfs.fsf@mat.ucm.es> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4003:c06::22c X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:226764 Archived-At: On Wed, Jun 27, 2018 at 3:10 PM Uwe Brauer wrote: > Maybe I am missing something elementary here. I came across with a file > which still had quoted printable encoding like this > > Buenas d=3DC3=3DADas: > > So I used > (quoted-printable-decode-region (region-beginning) (region-end) nil) > > But I obtained the following > > Buedas d\303\255as: 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=E2=80=99s chars= et=3D parameter. =3DC3=3DAD 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.