to a file and run: emacs -Q -l * Detailed analysis: The example code sets up a response buffer for a successful managesieve `response-getscript` defined as: response-getscript = (sieve-script CRLF response-ok) Here's the buffer content: ``` 1: {32} 2: if body :matches "ä" { stop; } 3: 4: OK "Getscript completed." ``` It comprises: 1. lines 1-2 (`sieve-script`): encoded as a managesieve `literal-s2c` string which: a. starts with a length in the form '{}' (i.e. 32) b. followed by the string data (i.e. the actual script: 'if body :matches "ä" { stop;}') using UTF-8 encoding 2. line 3 (`CRLF`) 3. line 4 (`response-ok`): 'OK' SP "Getscript completed." (the latter is an optional `quoted` string which can be shown to the user) The sieve-manage code is parsing the length into an integer and uses it to skip over `sieve-script` to get to the start of line 3 ( - empty) which is then also skipped to get to line 4 in order to parse the result ('OK'). Now the problem: Since sieve-manage explicitly enables multibyte support in the response buffer (by calling '(mm-enable-multibyte)' in `sieve-manage-make-process-buffer`) and uses `goto-char' for the purpose of skipping/jumping over `sieve-script`, each multibyte character in `sieve-script` causes the jump to go 1 (2, 3) character(s) too far. In the example above there's only a single 2 byte character (`ä`), so instead of skipping to the beginning of line 3, we land in the middle of : . This causes the following attempt to parse the result code (i.e. the 'OK "Getscript completed."' line) to infloop in `sieve-manage-parse-okno'. * An attempt of a fix: As far as I can tell, the attached patch fixes the issue for the GETSCRIPT command.