diff options
| author | Kenichi Handa | 2002-05-31 01:03:50 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2002-05-31 01:03:50 +0000 |
| commit | 16eafb5da6c22f0f20d2a22475e11749c79f3a42 (patch) | |
| tree | b70afa38e744f98a6b78dd6cfb6337c26998ccf0 /src/coding.c | |
| parent | 812b3925500a3b612df2b8e701eb6e2f5e96d57b (diff) | |
| download | emacs-16eafb5da6c22f0f20d2a22475e11749c79f3a42.tar.gz emacs-16eafb5da6c22f0f20d2a22475e11749c79f3a42.zip | |
(encode_coding_emacs_mule): Pay attention to raw-8-bit chars.
(encode_coding_iso_2022): Likewise.
(encode_coding_sjis): Likewise.
(encode_coding_big5): Likewise.
(encode_coding_charset): Likewise.
Diffstat (limited to 'src/coding.c')
| -rw-r--r-- | src/coding.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/coding.c b/src/coding.c index 7cc5f6bbd9c..abc11ea5eb7 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -1999,6 +1999,11 @@ encode_coding_emacs_mule (coding) | |||
| 1999 | c = *charbuf++; | 1999 | c = *charbuf++; |
| 2000 | if (ASCII_CHAR_P (c)) | 2000 | if (ASCII_CHAR_P (c)) |
| 2001 | EMIT_ONE_ASCII_BYTE (c); | 2001 | EMIT_ONE_ASCII_BYTE (c); |
| 2002 | else if (CHAR_BYTE8_P (c)) | ||
| 2003 | { | ||
| 2004 | c = CHAR_TO_BYTE8 (c); | ||
| 2005 | EMIT_ONE_BYTE (c); | ||
| 2006 | } | ||
| 2002 | else | 2007 | else |
| 2003 | { | 2008 | { |
| 2004 | struct charset *charset; | 2009 | struct charset *charset; |
| @@ -3555,6 +3560,11 @@ encode_coding_iso_2022 (coding) | |||
| 3555 | ENCODE_ISO_CHARACTER (charset, c); | 3560 | ENCODE_ISO_CHARACTER (charset, c); |
| 3556 | } | 3561 | } |
| 3557 | } | 3562 | } |
| 3563 | else if (CHAR_BYTE8_P (c)) | ||
| 3564 | { | ||
| 3565 | c = CHAR_TO_BYTE8 (c); | ||
| 3566 | EMIT_ONE_BYTE (c); | ||
| 3567 | } | ||
| 3558 | else | 3568 | else |
| 3559 | { | 3569 | { |
| 3560 | struct charset *charset = char_charset (c, charset_list, NULL); | 3570 | struct charset *charset = char_charset (c, charset_list, NULL); |
| @@ -3925,6 +3935,11 @@ encode_coding_sjis (coding) | |||
| 3925 | /* Now encode the character C. */ | 3935 | /* Now encode the character C. */ |
| 3926 | if (ASCII_CHAR_P (c) && ascii_compatible) | 3936 | if (ASCII_CHAR_P (c) && ascii_compatible) |
| 3927 | EMIT_ONE_ASCII_BYTE (c); | 3937 | EMIT_ONE_ASCII_BYTE (c); |
| 3938 | else if (CHAR_BYTE8_P (c)) | ||
| 3939 | { | ||
| 3940 | c = CHAR_TO_BYTE8 (c); | ||
| 3941 | EMIT_ONE_BYTE (c); | ||
| 3942 | } | ||
| 3928 | else | 3943 | else |
| 3929 | { | 3944 | { |
| 3930 | unsigned code; | 3945 | unsigned code; |
| @@ -3993,6 +4008,11 @@ encode_coding_big5 (coding) | |||
| 3993 | /* Now encode the character C. */ | 4008 | /* Now encode the character C. */ |
| 3994 | if (ASCII_CHAR_P (c) && ascii_compatible) | 4009 | if (ASCII_CHAR_P (c) && ascii_compatible) |
| 3995 | EMIT_ONE_ASCII_BYTE (c); | 4010 | EMIT_ONE_ASCII_BYTE (c); |
| 4011 | else if (CHAR_BYTE8_P (c)) | ||
| 4012 | { | ||
| 4013 | c = CHAR_TO_BYTE8 (c); | ||
| 4014 | EMIT_ONE_BYTE (c); | ||
| 4015 | } | ||
| 3996 | else | 4016 | else |
| 3997 | { | 4017 | { |
| 3998 | unsigned code; | 4018 | unsigned code; |
| @@ -4475,6 +4495,11 @@ encode_coding_charset (coding) | |||
| 4475 | c = *charbuf++; | 4495 | c = *charbuf++; |
| 4476 | if (ascii_compatible && ASCII_CHAR_P (c)) | 4496 | if (ascii_compatible && ASCII_CHAR_P (c)) |
| 4477 | EMIT_ONE_ASCII_BYTE (c); | 4497 | EMIT_ONE_ASCII_BYTE (c); |
| 4498 | else if (CHAR_BYTE8_P (c)) | ||
| 4499 | { | ||
| 4500 | c = CHAR_TO_BYTE8 (c); | ||
| 4501 | EMIT_ONE_BYTE (c); | ||
| 4502 | } | ||
| 4478 | else | 4503 | else |
| 4479 | { | 4504 | { |
| 4480 | charset = char_charset (c, charset_list, &code); | 4505 | charset = char_charset (c, charset_list, &code); |