diff options
| author | Kenichi Handa | 2000-09-07 12:04:09 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2000-09-07 12:04:09 +0000 |
| commit | 39658efc4056074ede7d8a343ac6d735d00019e4 (patch) | |
| tree | dfbedfea055ea8ab0275683aae459994a7d55834 /src/coding.c | |
| parent | 3c014385fa789ece3d0d22ff2b364711b33139a2 (diff) | |
| download | emacs-39658efc4056074ede7d8a343ac6d735d00019e4.tar.gz emacs-39658efc4056074ede7d8a343ac6d735d00019e4.zip | |
(encode_coding_sjis_big5): Use translation table for
encoding, not decoding. Check for the charset katakana-jisx0201,
not latin-jisx0201.
(ONE_MORE_CHAR): Call translate_char with CHARSET arg -1.
Diffstat (limited to 'src/coding.c')
| -rw-r--r-- | src/coding.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/coding.c b/src/coding.c index 1f10672d840..8e284122ee4 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -235,7 +235,7 @@ encode_coding_XXX (coding, source, destination, src_bytes, dst_bytes) | |||
| 235 | else \ | 235 | else \ |
| 236 | c = *src, bytes = 1; \ | 236 | c = *src, bytes = 1; \ |
| 237 | if (!NILP (translation_table)) \ | 237 | if (!NILP (translation_table)) \ |
| 238 | c = translate_char (translation_table, c, 0, 0, 0); \ | 238 | c = translate_char (translation_table, c, -1, 0, 0); \ |
| 239 | src += bytes; \ | 239 | src += bytes; \ |
| 240 | } while (0) | 240 | } while (0) |
| 241 | 241 | ||
| @@ -2549,9 +2549,9 @@ encode_coding_sjis_big5 (coding, source, destination, | |||
| 2549 | translation_table = Qnil; | 2549 | translation_table = Qnil; |
| 2550 | else | 2550 | else |
| 2551 | { | 2551 | { |
| 2552 | translation_table = coding->translation_table_for_decode; | 2552 | translation_table = coding->translation_table_for_encode; |
| 2553 | if (NILP (translation_table)) | 2553 | if (NILP (translation_table)) |
| 2554 | translation_table = Vstandard_translation_table_for_decode; | 2554 | translation_table = Vstandard_translation_table_for_encode; |
| 2555 | } | 2555 | } |
| 2556 | 2556 | ||
| 2557 | while (1) | 2557 | while (1) |
| @@ -2596,8 +2596,8 @@ encode_coding_sjis_big5 (coding, source, destination, | |||
| 2596 | ENCODE_SJIS (c1, c2, c1, c2); | 2596 | ENCODE_SJIS (c1, c2, c1, c2); |
| 2597 | EMIT_TWO_BYTES (c1, c2); | 2597 | EMIT_TWO_BYTES (c1, c2); |
| 2598 | } | 2598 | } |
| 2599 | else if (charset == charset_latin_jisx0201) | 2599 | else if (charset == charset_katakana_jisx0201) |
| 2600 | EMIT_ONE_BYTE (c1); | 2600 | EMIT_ONE_BYTE (c1 | 0x80); |
| 2601 | else | 2601 | else |
| 2602 | /* There's no way other than producing the internal | 2602 | /* There's no way other than producing the internal |
| 2603 | codes as is. */ | 2603 | codes as is. */ |