From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tim Landscheidt Newsgroups: gmane.emacs.help Subject: Re: url-retrieve and encoding Date: Sat, 10 Feb 2024 20:51:54 +0000 Organization: https://www.tim-landscheidt.de/ Message-ID: <87jznc11qt.fsf@vagabond.tim-landscheidt.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36946"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux) Cc: help-gnu-emacs@gnu.org To: tomas@tuxteam.de Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Feb 10 21:52:44 2024 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rYuL5-0009S3-Uc for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 10 Feb 2024 21:52:43 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rYuKS-0007eD-68; Sat, 10 Feb 2024 15:52:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rYuKP-0007e0-UE for help-gnu-emacs@gnu.org; Sat, 10 Feb 2024 15:52:01 -0500 Original-Received: from gavdos.tim-landscheidt.de ([2a01:4f8:1c0c:4bd6::1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rYuKO-0003z7-By for help-gnu-emacs@gnu.org; Sat, 10 Feb 2024 15:52:01 -0500 Original-Received: from port-62-145-29-194.static.as20676.net ([62.145.29.194]:60942 helo=vagabond) by gavdos.tim-landscheidt.de with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1rYuKJ-00ChQS-1i; Sat, 10 Feb 2024 20:51:56 +0000 In-Reply-To: (tomas@tuxteam.de's message of "Sat, 10 Feb 2024 20:31:02 +0100") Received-SPF: pass client-ip=2a01:4f8:1c0c:4bd6::1; envelope-from=tim@tim-landscheidt.de; helo=gavdos.tim-landscheidt.de X-Spam_score_int: 14 X-Spam_score: 1.4 X-Spam_bar: + X-Spam_report: (1.4 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:145906 Archived-At: tomas@tuxteam.de wrote: > I'm trying to fetch a Web resource via https with Emacs. > IIUC, url-retrieve (and its sinchronous friend) are the tools for > the job. They work nicely, but they leave me with a unibyte buffer > (confusingly, the line endings are just linefeeds: from the HTTP > specs I'd expected "\r\n") > [=E2=80=A6] I don't know if it is the correct way, but I have been using (the undocumented) url-insert-file-contents for a while now and it has worked for me very well. I have not tested any edge cases, though. Tim