Mercurial > emacs
diff src/term.c @ 111651:dbffbd2b89b9
Use \uNNNN, \UNNNNNN, or \xNNNNNN for hex-code display on a TTY.
term.c (produce_glyphless_glyph): Use \uNNNN, \UNNNNNN, or
\xNNNNNN for hex-code display of glyphless characters.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Sat, 20 Nov 2010 17:04:50 +0200 |
parents | 107fd4b37e9d |
children | b9616a1b568d |
line wrap: on
line diff
--- a/src/term.c Sat Nov 20 15:51:25 2010 +0100 +++ b/src/term.c Sat Nov 20 17:04:50 2010 +0200 @@ -1936,7 +1936,7 @@ { int face_id; int len; - char buf[11], *str = " "; + char buf[9], *str = " "; /* Get a face ID for the glyph by utilizing a cache (the same way as done for `escape-glyph' in get_next_display_element). */ @@ -1987,10 +1987,9 @@ else { xassert (it->glyphless_method == GLYPHLESS_DISPLAY_HEX_CODE); - len = (it->c < 0x100 ? sprintf (buf, "[U+%02X]", it->c) - : it->c < 0x10000 ? sprintf (buf, "[U+%04X]", it->c) - : it->c <= MAX_UNICODE_CHAR ? sprintf (buf, "[U+%06X]", it->c) - : sprintf (buf, "[E+%06X]", it->c)); + len = (it->c < 0x10000 ? sprintf (buf, "\\u%04X", it->c) + : it->c <= MAX_UNICODE_CHAR ? sprintf (buf, "\\U%06X", it->c) + : sprintf (buf, "\\x%06X", it->c)); } str = buf; }