From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Newsgroups: gmane.emacs.devel Subject: Re: How to get buffer byte length (not number of characters)? Date: Thu, 22 Aug 2024 14:47:03 +0200 Message-ID: References: <87wmkbekjp.fsf@ushin.org> <86o75nwilg.fsf@gnu.org> <87bk1lhkvg.fsf@ushin.org> <86y14pu5rp.fsf@gnu.org> <871q2hfn7c.fsf@ushin.org> <86plq1td4n.fsf@gnu.org> <87ed6hdnpe.fsf@ushin.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="GR9I+EcWODZoSU9o" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20326"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Joseph Turner , Eli Zaretskii , emacs-devel@gnu.org, schwab@suse.de To: Adam Porter Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Aug 22 14:48:14 2024 Return-path: Envelope-to: ged-emacs-devel@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 1sh7Eb-00056X-IF for ged-emacs-devel@m.gmane-mx.org; Thu, 22 Aug 2024 14:48:13 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sh7Dq-00063Z-GT; Thu, 22 Aug 2024 08:47:26 -0400 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 1sh7Dg-000618-81 for emacs-devel@gnu.org; Thu, 22 Aug 2024 08:47:19 -0400 Original-Received: from mail.tuxteam.de ([5.199.139.25]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sh7Dd-0000OZ-UA; Thu, 22 Aug 2024 08:47:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=From:In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=1r/2Md2jmVqA2xmA6OUHeRgf1WFEYvEYJQdl+lCs37s=; b=LRwi25f87hZlU0YWaOi1+Uobb2 XC3XpKoYTZBpkDf4aPwpaJWlh1nz1k3FwL+F/PumpoeRiQkBE8dLwwh0XjaOxzO72oFwyO2mdZiGr uYglbdBx9MPg2atdfl7D+OaXaF92djQBI8rnYhbj9ewZEHw+8QRd1j5OAFid1DoHK1vSV1dmv5PPL FtCPZx7TWz6RAD77uVgyfR7MlgWFW/I2G1kIPr2HyWWXpJU6oG8idU+qPS49bU19f+Lw96MoghcHO YGx09tBWwM1SdUj0X+K0Mg7S9TXiNTrO+5IaNfJdVFO4VCahyO4fpgWLYqAWTgPTR1Gc2SVWgIdFH QHUdcDXQ==; Original-Received: from tomas by mail.tuxteam.de with local (Exim 4.94.2) (envelope-from ) id 1sh7DT-0002dd-D7; Thu, 22 Aug 2024 14:47:03 +0200 Content-Disposition: inline In-Reply-To: Received-SPF: pass client-ip=5.199.139.25; envelope-from=tomas@tuxteam.de; helo=mail.tuxteam.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:323045 Archived-At: --GR9I+EcWODZoSU9o Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 22, 2024 at 07:26:58AM -0500, Adam Porter wrote: [...] > From an API perspective, I'm not sure. My idea for plz.el is to provide a > simple, somewhat idiomatic Elisp API for making HTTP requests (and, of > course, to make "correct" requests, in compliance with specifications and > expectations). Given the relatively few clients of plz thus far, some > issues are yet to be fully explored and developed, and encoding/decoding = may > be one of those rougher edges. For the use cases I'm aware of, it seems = to > work well and correctly, but there are undoubtedly improvements to be mad= e. Another point I haven't seen in this discussion is that HTTP also may carry metadata about what it thinks the content encoding is. This may involve the server configuration too. You may choose to ignore it, but then you need to convince all the moving parts to agree on that (i.e. an Apache on the other side might happily tell your client that it is sending "text/plain; charset=3DUTF-8" or something similarly funny (note: UTF-8 isn't a charset :-) depending on the web server config, the content of some mimetype database and so on. You'll have to make sure curl and Emacs do the right thing with that (which might be "nothing"). Cheers --=20 t --GR9I+EcWODZoSU9o Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRp53liolZD6iXhAoIFyCz1etHaRgUCZsczOQAKCRAFyCz1etHa RmZqAJ0VCx0DpYVZPI28jpX35+pqfQ3sWACfbPJkNyMtwDpQqS2HiyuenpI/kUU= =k3BX -----END PGP SIGNATURE----- --GR9I+EcWODZoSU9o--