comparison src/insdel.c @ 23155:8d75946934cf

(copy_text): If Vnonascii_translation_table is non-nil, try to convert a character less than 160 to multibyte. (count_size_as_multibyte): Likewise.
author Kenichi Handa <handa@m17n.org>
date Mon, 31 Aug 1998 03:50:17 +0000
parents fed2ba47003f
children a4e688757109
comparison
equal deleted inserted replaced
23154:a9cbf64603ca 23155:8d75946934cf
734 { 734 {
735 int c = *from_addr++; 735 int c = *from_addr++;
736 unsigned char workbuf[4], *str; 736 unsigned char workbuf[4], *str;
737 int len; 737 int len;
738 738
739 if (c >= 0240 && c < 0400) 739 if ((c >= 0240 || !NILP (Vnonascii_translation_table)) && c < 0400)
740 { 740 {
741 c = unibyte_char_to_multibyte (c); 741 c = unibyte_char_to_multibyte (c);
742 len = CHAR_STRING (c, workbuf, str); 742 len = CHAR_STRING (c, workbuf, str);
743 bcopy (str, to_addr, len); 743 bcopy (str, to_addr, len);
744 to_addr += len; 744 to_addr += len;
766 766
767 for (i = 0; i < nbytes; i++) 767 for (i = 0; i < nbytes; i++)
768 { 768 {
769 unsigned int c = *ptr++; 769 unsigned int c = *ptr++;
770 770
771 if (c < 0240) 771 if (c < 0240 && NILP (Vnonascii_translation_table))
772 outgoing_nbytes++; 772 outgoing_nbytes++;
773 else 773 else
774 { 774 {
775 c = unibyte_char_to_multibyte (c); 775 c = unibyte_char_to_multibyte (c);
776 outgoing_nbytes += CHAR_BYTES (c); 776 outgoing_nbytes += CHAR_BYTES (c);