diff options
| author | Eli Zaretskii | 2023-01-12 16:36:35 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2023-01-12 16:36:35 +0200 |
| commit | cfd2b3504ab5de6eb5f3c7a0784cb447883e1326 (patch) | |
| tree | 05cd282566387e4c469e44830f50586dd56ae026 /src/coding.c | |
| parent | 53b47df8229a3a54777940663edda28de0a01b90 (diff) | |
| download | emacs-cfd2b3504ab5de6eb5f3c7a0784cb447883e1326.tar.gz emacs-cfd2b3504ab5de6eb5f3c7a0784cb447883e1326.zip | |
Fix encoding with 'utf-8-auto'
* src/coding.c (encode_coding_utf_8): Fix encoding with
'utf-8-auto': it should produce BOM, per the documentation of
the :bom attribute. (Bug#60750)
* lisp/international/mule.el (define-coding-system): Doc fix.
* test/src/coding-tests.el (coding-tests): Use
'with-coding-priority' instead of 'prefer-coding-system', as the
latter has global persistent effect and affects further tests.
Diffstat (limited to 'src/coding.c')
| -rw-r--r-- | src/coding.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/coding.c b/src/coding.c index 4e59f2b6a1b..49dcd8634f3 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -1431,7 +1431,7 @@ encode_coding_utf_8 (struct coding_system *coding) | |||
| 1431 | ptrdiff_t produced_chars = 0; | 1431 | ptrdiff_t produced_chars = 0; |
| 1432 | int c; | 1432 | int c; |
| 1433 | 1433 | ||
| 1434 | if (CODING_UTF_8_BOM (coding) == utf_with_bom) | 1434 | if (CODING_UTF_8_BOM (coding) != utf_without_bom) |
| 1435 | { | 1435 | { |
| 1436 | ASSURE_DESTINATION (3); | 1436 | ASSURE_DESTINATION (3); |
| 1437 | EMIT_THREE_BYTES (UTF_8_BOM_1, UTF_8_BOM_2, UTF_8_BOM_3); | 1437 | EMIT_THREE_BYTES (UTF_8_BOM_1, UTF_8_BOM_2, UTF_8_BOM_3); |