From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#54154: 29.0.50; [PATCH] `sieve-manage-getscript' fails if script contains multibyte characters Date: Fri, 25 Feb 2022 14:10:56 +0100 Message-ID: <875yp3w0pr.fsf@gnus.org> References: <87wnhj5nbk.fsf@tetzco.de> <878rtzxhnc.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5581"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 54154@debbugs.gnu.org To: "Kai Tetzlaff" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Feb 25 14:51:24 2022 Return-path: Envelope-to: geb-bug-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 1nNb0F-0001B7-6u for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 25 Feb 2022 14:51:23 +0100 Original-Received: from localhost ([::1]:45368 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nNb0D-00038l-Gs for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 25 Feb 2022 08:51:21 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:34956) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nNaOA-0006em-Rx for bug-gnu-emacs@gnu.org; Fri, 25 Feb 2022 08:12:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57650) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nNaOA-0004Px-AK for bug-gnu-emacs@gnu.org; Fri, 25 Feb 2022 08:12:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nNaOA-00061o-69 for bug-gnu-emacs@gnu.org; Fri, 25 Feb 2022 08:12:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 25 Feb 2022 13:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54154 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 54154-submit@debbugs.gnu.org id=B54154.164579466723093 (code B ref 54154); Fri, 25 Feb 2022 13:12:02 +0000 Original-Received: (at 54154) by debbugs.gnu.org; 25 Feb 2022 13:11:07 +0000 Original-Received: from localhost ([127.0.0.1]:51547 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNaNH-00060P-JA for submit@debbugs.gnu.org; Fri, 25 Feb 2022 08:11:07 -0500 Original-Received: from smtp.domeneshop.no ([194.63.252.55]:35145) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNaNE-0005zm-0O for 54154@debbugs.gnu.org; Fri, 25 Feb 2022 08:11:06 -0500 Original-Received: from [84.212.220.105] (port=34652 helo=giant) by smtp.domeneshop.no with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nNaN7-0008W1-HY; Fri, 25 Feb 2022 14:10:57 +0100 In-Reply-To: <878rtzxhnc.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 25 Feb 2022 13:19:51 +0100") Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAGFBMVEX27dH07NTb0rSr pI7m2rjGuaOHiHr///+41XY3AAAAAWJLR0QHFmGI6wAAAAd0SU1FB+YCGQs2C0mDvlYAAAG6SURB VDjLbZJBlpswDECl1N2bDN0TYbqeGZesjWv2FEIvwJvc/wgjAU4MQS/hgb/1ZcsGyF4C5QHP122A /C7zq96Dk7WfaRZG8GZN+e9IVX5g/nkAdKt/XQYUg95m6J/Dx4BRHiFgpn/fncUDFd7GvH6tgVnb 6B/dY5lnyhvZF4B+q6lGBA0Yfecmz+SrsgVqBFkYnrO8WVWY8eRMA8g4nKkiMt5wcR5myg+2shmX vrJYQ8MZMIdgXuai8oEMXSCGhuNAAOdAHZAQHCwA5R8FKhgXwWMqGwKHiiBOdqKR2LkdhJWsGRjl oLjAmiK6UJFM4U8XvAC1cXnHCkUUixTJkgRTotrk+RmoF6BmoBQLFDyYrwq1qP53YNK988IZmIFv LOx36YNp7dXaXYm5SGknazvZ4BaU9nqfbAe7DqswXO/3qUt2v/IwTFc7OWX2RXxZT8OX4xaB21Xv rTcwZ7htEV84M59Jf9uC0POoe70m3BHDR+ALaN+fdDlcIhp7gr9/TmSedTxVIweDgVvpisd14dlM qpHAvqclTlTNGRWDOl1wywX6ik0MbNouGut6JBJVfUsyTr14GHj6BnxrY2eh47n+AAAAJXRFWHRk YXRlOmNyZWF0ZQAyMDIyLTAyLTI1VDExOjU0OjExKzAwOjAwquXbswAAACV0RVh0ZGF0ZTptb2Rp ZnkAMjAyMi0wMi0yNVQxMTo1NDoxMSswMDowMNu4Yw8AAAAASUVORK5CYII= X-Now-Playing: Patrik Torsson's =?UTF-8?Q?=5FKolv=C3=A4teserenader=5F:?= "Nattglimmer" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:227632 Archived-At: The mail bounced with: kai.tetzlaff@t-online.de host mx03.t-online.de [194.25.134.73] SMTP error from remote mail server after initial connection: 554 IP=95.216.78.240 - A problem occurred. (Ask your postmaster for help or to contact tosa@rx.t-online.de to clarify.) Trying to send via a different SMTP server... Lars Ingebrigtsen writes: > "Kai Tetzlaff" writes: > >> (with-current-buffer (or buffer (current-buffer)) >> (sieve-manage-send (format "GETSCRIPT \"%s\"" name)) >> + (set-buffer-multibyte nil) >> (let ((script (sieve-manage-parse-string))) >> + (set-buffer-multibyte t) > > Changing multibyteness in a buffer like this is (virtually) never the > right thing to do -- it usually leads to obscure breakages. > >> In general, it is also not clear to me why the response (or process) >> buffer needs to be multibyte enabled at all as it should only be used >> for the line/byte oriented protocol data. But the commit message of >> 8e16fb987df9b which introduced the multibyte handling states: >> >> commit 8e16fb987df9b80b8328e9dbf80351a5f9d85bbb >> Author: Albert Krewinkel >> Date: 2013-06-11 07:32:25 +0000 >> ... >> * Enable Multibyte for SieveManage buffers: The parser won't properly >> handle umlauts and line endings unless multibyte is turned on in the >> process buffer. >> ... >> >> so this was obviously done on purpose. I contacted Albert about this but >> he couldn't remember the details (it's been nearly 10 years). > > I don't see why this buffer should be multibyte, either. The > communication with the server is done using bytes, not characters. When > we need to have characters, we should decode the data and put it in a > multibyte buffer. > > So can you try to back out that commit and see whether it fixes the > problem instead? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no