Mercurial > emacs
diff src/coding.c @ 22723:04b653d7f842
(code_convert_string): Count characters again if we
encounter some invalid code while decoding.
| author | Kenichi Handa <handa@m17n.org> |
|---|---|
| date | Thu, 09 Jul 1998 04:33:00 +0000 |
| parents | 3e3949ac4cfb |
| children | 7ab6c2f70b0b |
line wrap: on
line diff
--- a/src/coding.c Thu Jul 09 04:03:27 1998 +0000 +++ b/src/coding.c Thu Jul 09 04:33:00 1998 +0000 @@ -4433,8 +4433,13 @@ if (encodep) str = make_unibyte_string (buf, len + coding->produced); else - str = make_string_from_bytes (buf, len + coding->produced_char, - len + coding->produced); + { + int chars= (coding->fake_multibyte + ? multibyte_chars_in_text (buf + from, coding->produced) + : coding->produced_char); + str = make_multibyte_string (buf, len + chars, len + coding->produced); + } + return str; }
