diff options
| author | Mattias Engdegård | 2025-07-05 13:20:18 +0200 |
|---|---|---|
| committer | Mattias Engdegård | 2025-07-07 11:30:07 +0200 |
| commit | d13693ef4ec9428e2356b0de29913d533c5c4382 (patch) | |
| tree | 2b0139e06a094d311c4b540d8ae7566158b58611 /test/src/lread-tests.el | |
| parent | f2f76756211fd5a0914734c738508f522c4b2ccd (diff) | |
| download | emacs-d13693ef4ec9428e2356b0de29913d533c5c4382.tar.gz emacs-d13693ef4ec9428e2356b0de29913d533c5c4382.zip | |
Read non-ASCII chars from unibyte string sources as raw bytes
Previously, latin-1 was incorrectly assumed (bug#70988).
* src/lread.c (readchar): Convert to raw byte.
* test/src/lread-tests.el (lread-unibyte-string-source): New test.
Diffstat (limited to 'test/src/lread-tests.el')
| -rw-r--r-- | test/src/lread-tests.el | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/src/lread-tests.el b/test/src/lread-tests.el index d832cc9aa4e..d9b31a6c438 100644 --- a/test/src/lread-tests.el +++ b/test/src/lread-tests.el | |||
| @@ -392,4 +392,10 @@ literals (Bug#20852)." | |||
| 392 | (val (read (lambda () (pop s))))) | 392 | (val (read (lambda () (pop s))))) |
| 393 | (should (equal (symbol-name val) "A∪ÿ")))) | 393 | (should (equal (symbol-name val) "A∪ÿ")))) |
| 394 | 394 | ||
| 395 | (ert-deftest lread-unibyte-string-source () | ||
| 396 | (let* ((src "\"a\xff\"") | ||
| 397 | (val (read src))) | ||
| 398 | (should (equal val "a\xff")) ; not "aÿ" | ||
| 399 | (should-not (multibyte-string-p val)))) | ||
| 400 | |||
| 395 | ;;; lread-tests.el ends here | 401 | ;;; lread-tests.el ends here |