From: Kenichi Handa Date: Mon, 17 Feb 2003 00:33:01 +0000 (+0000) Subject: (string_to_multibyte): Always return a multibyte string. X-Git-Tag: ttn-vms-21-2-B4~11170 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=fb4452cc3205120d4f8d515083474d9bd05daa43;p=emacs.git (string_to_multibyte): Always return a multibyte string. --- diff --git a/src/ChangeLog b/src/ChangeLog index 877a73c2657..535558bee2d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2003-02-17 Kenichi Handa + + * fns.c (string_to_multibyte): Always return a multibyte string. + 2003-02-16 Jason Rumney * w32fns.c (w32_list_bdf_fonts, w32_list_fonts): Negative diff --git a/src/fns.c b/src/fns.c index 69c7418845e..729872722bd 100644 --- a/src/fns.c +++ b/src/fns.c @@ -1053,10 +1053,10 @@ string_to_multibyte (string) 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));