Subject: bug#70988: (read FUNCTION) uses Latin-1 [PATCH]

From: Eli Zaretskii <[email-masked]>
Date: Thu, 13 Feb 2025 18:42:13 +0200

> Date: Thu, 13 Feb 2025 14:08:02 +0000
> From: Pip Cet <[email-masked]>
> Cc: Mattias Engdegård <[email-masked]>, [email-masked], Eli Zaretskii <[email-masked]>, [email-masked]
> 
> @@ -3058,7 +3058,8 @@ read_char_escape (Lisp_Object readcharfun, int next_char)
>        chr = c;
>        break;
>      }
> -  eassert (chr >= 0 && chr < (1 << CHARACTERBITS));
> +  if (chr < 0 || chr > (1 << CHARACTERBITS))
> +    invalid_syntax ("Invalid character", readcharfun);

Please leave the assertion in place here (in addition to the error
message), since an abort is easier to spot than an error message,
especially if someone catches errors at a higher level.

I'm okay with the rest of this patch, thanks.