# HG changeset patch # User Kenichi Handa # Date 1045441932 0 # Node ID 2a19e12053a41b974c158bc536fa0956e191f2ba # Parent 18c02ae69126ffe4f00bb8ee756da78f92ca9174 (string_to_multibyte): Always return a multibyte string. diff -r 18c02ae69126 -r 2a19e12053a4 src/fns.c --- a/src/fns.c Sun Feb 16 23:37:19 2003 +0000 +++ b/src/fns.c Mon Feb 17 00:32:12 2003 +0000 @@ -1053,10 +1053,10 @@ return string; nbytes = parse_str_to_multibyte (SDATA (string), SBYTES (string)); - /* If all the chars are ASCII, they won't need any more bytes - once converted. In that case, we can return STRING itself. */ + /* If all the chars are ASCII or eight-bit-graphic, they won't need + any more bytes once converted. */ if (nbytes == SBYTES (string)) - return string; + return make_multibyte_string (SDATA (string), nbytes, nbytes); buf = (unsigned char *) alloca (nbytes); bcopy (SDATA (string), buf, SBYTES (string));