GNU bug report logs -
#4848
23.1.50; \u and \x in string
Previous Next
Reported by: rms <at> gnu.org
Date: Mon, 2 Nov 2009 05:35:06 UTC
Severity: wishlist
Done: Noam Postavsky <npostavs <at> users.sourceforge.net>
Bug is archived. No further changes may be made.
Full log
Message #55 received at 4848 <at> emacsbugs.donarmstrong.com (full text, mbox):
I'm not sure what you wanted to be documented. Is the description in
"(elisp)General Escape Syntax" what you were looking for?
The version I have is from August. If it has been substantially
improved since then, maybe it is good. The text from August was
inadequate and even wrong:
To use hex, write a question mark followed by a backslash, @samp{x},
and the hexadecimal character code. You can use any number of hex
digits, so you can represent any character code in this way.
Thus, @samp{?\x41} for the character @kbd{A}, @samp{?\x1} for the
character @kbd{C-a}, and @code{?\x8e0} for the Latin-1 character
@iftex
@samp{@`a}.
@end iftex
@ifnottex
@samp{a} with grave accent.
@end ifnottex
And here is something from Non-ASCII In Strings:
You can also represent a multibyte non-@acronym{ASCII} character with its
character code: use a hex escape, @samp{\x <at> var{nnnnnnn}}, with as many
digits as necessary. (Multibyte non-@acronym{ASCII} character codes are all
greater than 256.) Any character which is not a valid hex digit
terminates this construct. If the next character in the string could be
interpreted as a hex digit, write @w{@samp{\ }} (backslash and space) to
terminate the hex escape---for example, @w{@samp{\x8e0\ }} represents
one character, @samp{a} with grave accent. @w{@samp{\ }} in a string
constant is just like backslash-newline; it does not contribute any
character to the string, but it does terminate the preceding hex escape.
This bug report was last modified 9 years and 36 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.