From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,NO_DNS_FOR_FROM, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from [192.168.1.2] (unknown [101.128.125.123]) by gnuweeb.org (Postfix) with ESMTPSA id E5709804D1; Fri, 21 Oct 2022 07:37:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1666337853; bh=u7sHNpx5h0m6owYxM6hpzMb9PrFOT7iu46tVyq8qQvo=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=oz29j4Pl6lMyH96bN+mmHMigfZpIlUo8TQN/j9I6M7wiNjtezH9ZZFSOGPgIj7r/k HMyjbou2Y8m4v29XDrTk7PwRmEyTpIZAI3jlWHUG955BwLZKi3FVXueqquOYjiOKdh 4ycf6MrKDvgtftuRclkgq43ZK+Lz+9p3RgqCLvk2w0OXS/e3icWie/EjMjgH373JBx pPRcO0mm8aaMRpFHDfV3V1c+aNXo+P8TD0o1oCe99tJmcEeAbsIaa70j8t+PTPTKp7 DltTgmNGnM4SlVI+whleTRWGIUKobXwMibVvFULV0Ke5OU4TcZBIufGD+G+Gfa7kXN L5kfNVIuY37ow== Message-ID: <7acac8ce-c086-5efb-656e-44544a8b848c@gnuweeb.org> Date: Fri, 21 Oct 2022 14:37:29 +0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.3.3 Subject: Re: [PATCH v1 6/7] atom: add manage_payload() Content-Language: en-US To: Ammar Faizi Cc: Alviro Iskandar Setiawan , GNU/Weeb Mailing List References: <20221018081635.1617-1-kiizuha@gnuweeb.org> <20221018081635.1617-7-kiizuha@gnuweeb.org> <561e1fe5-469c-53ba-2c97-35605307e2fb@gnuweeb.org> <8612169c-4b93-4557-23ab-9030e02a87b2@gnuweeb.org> From: Muhammad Rizki In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: On 21/10/2022 14.04, Ammar Faizi wrote: > On 10/20/22 12:23 AM, Muhammad Rizki wrote: >> On 20/10/2022 00.04, Ammar Faizi wrote: >>> On 10/18/22 3:16 PM, Muhammad Rizki wrote: >>>> +def manage_payload(payload: Message): >>>> +    p = str(payload.get_payload()) >>>> +    tf_encode = payload.get("Content-Transfer-Encoding") >>>> +    if tf_encode != "base64": >>>> +        return p.encode().decode("utf-8", errors="replace") >>>> +    return b64decode(p).decode("utf-8") >>> >>> What happen if we have "Content-Transfer-Encoding: quoted-printable"? >>> Does this decode it properly? >>> >>> Example: >>> https://lore.kernel.org/io-uring/20220908002616.3189675-1-shr@fb.com/raw >>> >> >> Yes, it does normally. > > It really *does not*, please try and see the output yourself. > The email sent to Telegram is not decoded. > IDk why you said it *does not* https://i.ibb.co/84LHCbt/image.png Can you explain?