From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: How to get buffer byte length (not number of characters)? Date: Thu, 22 Aug 2024 14:04:39 +0300 Message-ID: <865xrsu8c8.fsf@gnu.org> 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> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39663"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, schwab@suse.de, adam@alphapapa.net To: Joseph Turner Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Aug 22 13:05:37 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 1sh5dI-000A6s-PX for ged-emacs-devel@m.gmane-mx.org; Thu, 22 Aug 2024 13:05:36 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sh5cb-0007XK-Gl; Thu, 22 Aug 2024 07:04:54 -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 1sh5cU-0007WQ-Lf for emacs-devel@gnu.org; Thu, 22 Aug 2024 07:04:46 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sh5cT-0004n1-OI; Thu, 22 Aug 2024 07:04:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=8GKbZ+TJxTg/1Ulw8KPGm0MZC69OquSd2qmDu5nuVwU=; b=CJ9I1CTKxlZe 1BDawZQGxyuhV3j+VkP7TXNYPbbTSVlwjiJAs3m0TjRuoyiim9zLB7OGQQQ4erZ7GClh4n38loLFp a2Nxat/ETf/a2ioNLw07bSM3o4M5EzwZ8GIcNSReWxhpwntG9aW5wYIoxgXMIGNI44fk8bG90SYaR xcPlE2afp6+LCp3xMQWhrxFxJyRWJYfMD/eSJVxLqOka2NtrWDA/YvYpFi02jCQOFvIJnqxCMSWmm EA0sQkol2wPGTqEJXEaSzk0SU9haTgTmkPU+gmNvPsvE/ULuT9KukNohIXD/DUQUZx8aV0PQJZFaC vKT1/nDJANDOfvWpTOKBzg==; In-Reply-To: <87ed6hdnpe.fsf@ushin.org> (message from Joseph Turner on Thu, 22 Aug 2024 00:24:45 -0700) 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:323041 Archived-At: > From: Joseph Turner > Cc: emacs-devel@gnu.org, schwab@suse.de, adam@alphapapa.net > Date: Thu, 22 Aug 2024 00:24:45 -0700 > > > So maybe I misunderstand how these plz.el facilities are used, but up > > front this sounds like a mistake. > > It could be. Eli, Adam, what do you think about the default coding > systems for encoding the request body in the attached patch? I think it is better to use detect-coding-region instead, if buffer-file-coding-system is undecided. > > By "optionally" you mean that it doesn't always happen, except if the > > caller requests that? If so, the caller of plz.el should decode the > > text manually before using it in user-facing features. > > By default, `plz' decodes response body according to the 'Content-Type' > charset (or utf-8 as fallback). Passing `:decode nil' stops that. Sounds correct. > default-file-name-coding-system? That's for file names, so it is not what you want here.