summaryrefslogtreecommitdiff
path: root/src/coding.c
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>2000-09-07 12:04:09 +0000
committerKenichi Handa <handa@m17n.org>2000-09-07 12:04:09 +0000
commit39658efc4056074ede7d8a343ac6d735d00019e4 (patch)
treedfbedfea055ea8ab0275683aae459994a7d55834 /src/coding.c
parent3c014385fa789ece3d0d22ff2b364711b33139a2 (diff)
downloademacs-39658efc4056074ede7d8a343ac6d735d00019e4.tar.gz
emacs-39658efc4056074ede7d8a343ac6d735d00019e4.tar.bz2
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.c10
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)
else \
c = *src, bytes = 1; \
if (!NILP (translation_table)) \
- c = translate_char (translation_table, c, 0, 0, 0); \
+ c = translate_char (translation_table, c, -1, 0, 0); \
src += bytes; \
} while (0)
@@ -2549,9 +2549,9 @@ encode_coding_sjis_big5 (coding, source, destination,
translation_table = Qnil;
else
{
- translation_table = coding->translation_table_for_decode;
+ translation_table = coding->translation_table_for_encode;
if (NILP (translation_table))
- translation_table = Vstandard_translation_table_for_decode;
+ translation_table = Vstandard_translation_table_for_encode;
}
while (1)
@@ -2596,8 +2596,8 @@ encode_coding_sjis_big5 (coding, source, destination,
ENCODE_SJIS (c1, c2, c1, c2);
EMIT_TWO_BYTES (c1, c2);
}
- else if (charset == charset_latin_jisx0201)
- EMIT_ONE_BYTE (c1);
+ else if (charset == charset_katakana_jisx0201)
+ EMIT_ONE_BYTE (c1 | 0x80);
else
/* There's no way other than producing the internal
codes as is. */