[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#54154: 29.0.50; [PATCH] `sieve-manage-getscript' fails if script con
From: |
Lars Ingebrigtsen |
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 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
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 <larsi@gnus.org> writes:
> "Kai Tetzlaff" <kai.tetzlaff@t-online.de> 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 <krewinkel@moltkeplatz.de>
>> 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
- bug#54154: 29.0.50; [PATCH] `sieve-manage-getscript' fails if script contains multibyte characters, Kai Tetzlaff, 2022/02/25
- bug#54154: 29.0.50; [PATCH] `sieve-manage-getscript' fails if script contains multibyte characters, Lars Ingebrigtsen, 2022/02/25
- bug#54154: 29.0.50; [PATCH] `sieve-manage-getscript' fails if script contains multibyte characters,
Lars Ingebrigtsen <=
- bug#54154: 29.0.50; [PATCH] `sieve-manage-getscript' fails if script contains multibyte characters, Kai Tetzlaff, 2022/02/25
- bug#54154: 29.0.50; [PATCH] `sieve-manage-getscript' fails if script contains multibyte characters, Lars Ingebrigtsen, 2022/02/26
- bug#54154: 29.0.50; [PATCH] `sieve-manage-getscript' fails if script contains multibyte characters, Kai Tetzlaff, 2022/02/28
- bug#54154: 29.0.50; [PATCH] `sieve-manage-getscript' fails if script contains multibyte characters, Lars Ingebrigtsen, 2022/02/28
- bug#54154: 29.0.50; [PATCH] `sieve-manage-getscript' fails if script contains multibyte characters, Lars Ingebrigtsen, 2022/02/28
- bug#54154: 29.0.50; [PATCH] `sieve-manage-getscript' fails if script contains multibyte characters, Kai Tetzlaff, 2022/02/28
- bug#54154: 29.0.50; [PATCH] `sieve-manage-getscript' fails if script contains multibyte characters, Kai Tetzlaff, 2022/02/28