diff options
| author | Richard M. Stallman | 2002-03-03 20:04:17 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2002-03-03 20:04:17 +0000 |
| commit | ae7367d33b9b0762667345b480f1ee3f22479828 (patch) | |
| tree | 71da47c386861063c24530525ce95b003ea82099 /src | |
| parent | ae02e06a51271468e880d85acff4b600a9cb2421 (diff) | |
| download | emacs-ae7367d33b9b0762667345b480f1ee3f22479828.tar.gz emacs-ae7367d33b9b0762667345b480f1ee3f22479828.zip | |
(print_object): Output multibyte chars 128...255
using \x even if ! print_escape_multibyte.
Diffstat (limited to 'src')
| -rw-r--r-- | src/print.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/print.c b/src/print.c index f0501bd0fb7..6f9d4a0120c 100644 --- a/src/print.c +++ b/src/print.c | |||
| @@ -1429,11 +1429,15 @@ print_object (obj, printcharfun, escapeflag) | |||
| 1429 | PRINTCHAR ('\\'); | 1429 | PRINTCHAR ('\\'); |
| 1430 | PRINTCHAR ('f'); | 1430 | PRINTCHAR ('f'); |
| 1431 | } | 1431 | } |
| 1432 | else if (multibyte && ! ASCII_BYTE_P (c) | 1432 | else if (multibyte |
| 1433 | && print_escape_multibyte) | 1433 | && ! ASCII_BYTE_P (c) |
| 1434 | && (SINGLE_BYTE_CHAR_P (c) || print_escape_multibyte)) | ||
| 1434 | { | 1435 | { |
| 1435 | /* When multibyte is disabled, | 1436 | /* When multibyte is disabled, |
| 1436 | print multibyte string chars using hex escapes. */ | 1437 | print multibyte string chars using hex escapes. |
| 1438 | For a char code that could be in a unibyte string, | ||
| 1439 | when found in a multibyte string, always use a hex escape | ||
| 1440 | so it reads back as multibyte. */ | ||
| 1437 | unsigned char outbuf[50]; | 1441 | unsigned char outbuf[50]; |
| 1438 | sprintf (outbuf, "\\x%x", c); | 1442 | sprintf (outbuf, "\\x%x", c); |
| 1439 | strout (outbuf, -1, -1, printcharfun, 0); | 1443 | strout (outbuf, -1, -1, printcharfun, 0); |