Mercurial > emacs
changeset 43668:771bbdee433b
(print_object): Output multibyte chars 128...255
using \x even if ! print_escape_multibyte.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 03 Mar 2002 20:04:17 +0000 |
parents | 65b7d85cfbc1 |
children | 4bd6b6b21deb |
files | src/print.c |
diffstat | 1 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/print.c Sun Mar 03 20:02:08 2002 +0000 +++ b/src/print.c Sun Mar 03 20:04:17 2002 +0000 @@ -1429,11 +1429,15 @@ PRINTCHAR ('\\'); PRINTCHAR ('f'); } - else if (multibyte && ! ASCII_BYTE_P (c) - && print_escape_multibyte) + else if (multibyte + && ! ASCII_BYTE_P (c) + && (SINGLE_BYTE_CHAR_P (c) || print_escape_multibyte)) { /* When multibyte is disabled, - print multibyte string chars using hex escapes. */ + print multibyte string chars using hex escapes. + For a char code that could be in a unibyte string, + when found in a multibyte string, always use a hex escape + so it reads back as multibyte. */ unsigned char outbuf[50]; sprintf (outbuf, "\\x%x", c); strout (outbuf, -1, -1, printcharfun, 0);