GNU bug report logs -
#36988
26.2; Error "Non-hex digit used for Unicode escape" is not too helpful
Previous Next
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.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 36988 in the body.
You can then email your comments to 36988 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#36988
; Package
emacs
.
(Fri, 09 Aug 2019 16:26:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Drew Adams <drew.adams <at> oracle.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 09 Aug 2019 16:26:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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)
Dunno what the right fix/enhancement is, but this error message does not
seem very helpful in this case.
FWIW, I stumbled on this when code tried to read some Lisp code that
contained an MS Windows absolute file name where the backslashes were
not escaped, such as "C:\Users\foo.html". It would have been nice if a
better error message could have been presented to the user in such a
case.
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.
In GNU Emacs 26.2 (build 1, x86_64-w64-mingw32)
of 2019-04-13
Repository revision: fd1b34bfba8f3f6298df47c8e10b61530426f749
Windowing system distributor `Microsoft Corp.', version 10.0.17763
Configured using:
`configure --without-dbus --host=x86_64-w64-mingw32
--without-compress-install 'CFLAGS=-O2 -static -g3''
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#36988
; Package
emacs
.
(Fri, 23 Aug 2019 04:22:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 36988 <at> debbugs.gnu.org (full text, mbox):
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
Added tag(s) fixed.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Fri, 23 Aug 2019 04:22:03 GMT)
Full text and
rfc822 format available.
bug marked as fixed in version 27.1, send any further explanations to
36988 <at> debbugs.gnu.org and Drew Adams <drew.adams <at> oracle.com>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Fri, 23 Aug 2019 04:22:03 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 20 Sep 2019 11:24:10 GMT)
Full text and
rfc822 format available.
This bug report was last modified 5 years and 330 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.