emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] * etc/NEWS: Announce addition of BOM to utf-8-auto


From: Eli Zaretskii
Subject: Re: [PATCH] * etc/NEWS: Announce addition of BOM to utf-8-auto
Date: Sun, 29 Jan 2023 20:29:19 +0200

> From: Tom Gillespie <tgbugs@gmail.com>
> Date: Sun, 29 Jan 2023 12:58:38 -0500
> 
> --- a/etc/NEWS
> +++ b/etc/NEWS
> @@ -563,6 +563,9 @@ The variable 'font-lock-support-mode' is occasionally 
> useful for
>  debugging purposes.  It is now a regular variable (instead of a user
>  option) and can be set to nil to disable Just-in-time Lock mode.
>  
> +** The 'utf-8-auto' coding-system now includes a byte order mark

This is inaccurate: the change is only on encoding, and saying that a
coding-system "includes" a BOM is confusing English, IMO.

More importantly, it was a bugfix.  utf-8-auto was previously behaving
contrary to the documentation:

  ‘:bom’

  This attributes specifies whether the coding system uses a "byte order
  mark".  VALUE must be nil, t, or a cons cell of coding systems whose
  ‘:coding-type’ is ‘utf-16’ or ‘utf-8’.
  [...]
  If the value is a cons cell, on decoding, check the first two bytes.
  If they are 0xFE 0xFF, use the car part coding system of the value.
  If they are 0xFF 0xFE, use the cdr part coding system of the value.
  Otherwise, treat them as bytes for a normal character.  On encoding,
  produce BOM bytes according to the value of ‘:endian’.

Note the last sentence.

We don't announce bugfixes in NEWS, mainly because doing so would make
an already large file many times larger.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]