changeset 49815:2a19e12053a4

(string_to_multibyte): Always return a multibyte string.
author Kenichi Handa <handa@m17n.org>
date Mon, 17 Feb 2003 00:32:12 +0000
parents 18c02ae69126
children bc226af8acd5
files src/fns.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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));