GNU bug report logs - #36988
26.2; Error "Non-hex digit used for Unicode escape" is not too helpful

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Fri, 9 Aug 2019 16:26:02 UTC

Severity: wishlist

Tags: fixed

Found in version 26.2

Fixed in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 36988 <at> debbugs.gnu.org
Subject: bug#36988: 26.2; Error "Non-hex digit used for Unicode escape" is not too helpful
Date: Fri, 23 Aug 2019 06:21:31 +0200
Drew Adams <drew.adams <at> oracle.com> writes:

> emacs -Q
>
> Put this text in *scratch*, then move point to bob:
>
> "\u2"
>
> Then evaluate (read (current-buffer)).  You get this error:
>
> Debugger entered--Lisp error: (error "Non-hex digit used for Unicode escape")
>   read(#<buffer *scratch*>)
>   eval((read (current-buffer)) nil)
>   eval-expression((read (current-buffer)) nil nil 127)
>   funcall-interactively(eval-expression (read (current-buffer)) nil nil 127)
>   call-interactively(eval-expression nil nil)
>   command-execute(eval-expression)

[...]

> Perhaps there could be some way to point more or less to the offensive
> "Non-hex digit used for Unicode escape"?  In this case, the offense was
> apparently committed by the \u.

No, the quote mark.

I've now changed this error message to be a bit more helpful:

Non-hex character used for Unicode escape: " (34)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 5 years and 331 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.