comparison src/coding.c @ 88690:7f284ac55b07

(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.
author Kenichi Handa <handa@m17n.org>
date Fri, 31 May 2002 01:03:50 +0000
parents 2cdfbffa8a0d
children 75c78754826d
comparison
equal deleted inserted replaced
88689:e324faed6fcc 88690:7f284ac55b07
1997 { 1997 {
1998 ASSURE_DESTINATION (safe_room); 1998 ASSURE_DESTINATION (safe_room);
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;
2005 unsigned code; 2010 unsigned code;
2006 int dimension; 2011 int dimension;
3553 { 3558 {
3554 struct charset *charset = CHARSET_FROM_ID (charset_ascii); 3559 struct charset *charset = CHARSET_FROM_ID (charset_ascii);
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);
3561 3571
3562 if (!charset) 3572 if (!charset)
3923 ASSURE_DESTINATION (safe_room); 3933 ASSURE_DESTINATION (safe_room);
3924 c = *charbuf++; 3934 c = *charbuf++;
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;
3931 struct charset *charset = char_charset (c, charset_list, &code); 3946 struct charset *charset = char_charset (c, charset_list, &code);
3932 3947
3991 ASSURE_DESTINATION (safe_room); 4006 ASSURE_DESTINATION (safe_room);
3992 c = *charbuf++; 4007 c = *charbuf++;
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;
3999 struct charset *charset = char_charset (c, charset_list, &code); 4019 struct charset *charset = char_charset (c, charset_list, &code);
4000 4020
4473 4493
4474 ASSURE_DESTINATION (safe_room); 4494 ASSURE_DESTINATION (safe_room);
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);
4481 if (charset) 4506 if (charset)
4482 { 4507 {