[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#70988: (read FUNCTION) uses Latin-1 [PATCH]
From: |
Mattias Engdegård |
Subject: |
bug#70988: (read FUNCTION) uses Latin-1 [PATCH] |
Date: |
Thu, 16 May 2024 20:13:18 +0200 |
When `read` is called with a function as stream argument, the return values of
that function are often interpreted as Latin-1 characters with only the 8 low
bits used. Example:
(let* ((next '(?A #x12a nil))
(f (lambda (&rest args)
(if args
(push (car args) next)
(pop next)))))
(read f))
=> A* ; expected: AĪ
This is a result of `readchar` setting *multibyte to 0 on this code path.
The reader is not very consistent: inside string and character literals, the
code seems to work as expected.
The fix is straightforward (attached).
read-from-function.diff
Description: Binary data
- bug#70988: (read FUNCTION) uses Latin-1 [PATCH],
Mattias Engdegård <=
- bug#70988: (read FUNCTION) uses Latin-1 [PATCH], Eli Zaretskii, 2024/05/16
- bug#70988: (read FUNCTION) uses Latin-1 [PATCH], Mattias Engdegård, 2024/05/16
- bug#70988: (read FUNCTION) uses Latin-1 [PATCH], Eli Zaretskii, 2024/05/16
- bug#70988: (read FUNCTION) uses Latin-1 [PATCH], Mattias Engdegård, 2024/05/17
- bug#70988: (read FUNCTION) uses Latin-1 [PATCH], Eli Zaretskii, 2024/05/17
- bug#70988: (read FUNCTION) uses Latin-1 [PATCH], Mattias Engdegård, 2024/05/17
- bug#70988: (read FUNCTION) uses Latin-1 [PATCH], Mattias Engdegård, 2024/05/30