# HG changeset patch # User Richard M. Stallman # Date 1015185857 0 # Node ID 771bbdee433b28b9b3a5803e53d7b4ffcdb22770 # Parent 65b7d85cfbc175a02155e1aacc161ef1fc014f07 (print_object): Output multibyte chars 128...255 using \x even if ! print_escape_multibyte. diff -r 65b7d85cfbc1 -r 771bbdee433b src/print.c --- 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);