Commit fbbc2571 authored by Lars Ingebrigtsen's avatar Lars Ingebrigtsen

Give a better error message when reading invalid "\unicode" escapes.

* src/lread.c (read_escape): Give a clearer error message on
Unicode escape sequences (bug#36988).
parent e7d3ddf6
Pipeline #2945 failed with stage
in 90 minutes and 3 seconds
......@@ -2585,7 +2585,8 @@ read_escape (Lisp_Object readcharfun, bool stringp)
want. */
int digit = char_hexdigit (c);
if (digit < 0)
error ("Non-hex digit used for Unicode escape");
error ("Non-hex character used for Unicode escape: %c (%d)",
c, c);
i = (i << 4) + digit;
if (i > 0x10FFFF)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment