File bash-2.05b-utf8.patch of Package compat-readline4

--- lib/readline/histexpand.c
+++ lib/readline/histexpand.c	2002-08-22 10:37:38.000000000 +0100
@@ -202,6 +202,7 @@
 
   /* Only a closing `?' or a newline delimit a substring search string. */
   for (local_index = i; c = string[i]; i++)
+    {
 #if defined (HANDLE_MULTIBYTE)
     if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
       {
@@ -217,8 +218,8 @@
 	    i += v - 1;
 	    continue;
 	  }
-      }
-    else
+    }
+
 #endif /* HANDLE_MULTIBYTE */
       if ((!substring_okay && (whitespace (c) || c == ':' ||
 	  (history_search_delimiter_chars && member (c, history_search_delimiter_chars)) ||
@@ -226,6 +227,7 @@
 	  string[i] == '\n' ||
 	  (substring_okay && string[i] == '?'))
 	break;
+  }
 
   which = i - local_index;
   temp = (char *)xmalloc (1 + which);
--- lib/readline/display.c
+++ lib/readline/display.c	2003-02-11 13:27:46.000000000 +0000
@@ -1324,7 +1324,8 @@
 	      insert_some_chars (nfd, lendiff, col_lendiff);
 	      _rl_last_c_pos += col_lendiff;
 	    }
-	  else if (*ols == 0)
+	  else if ((MB_CUR_MAX == 1 || rl_byte_oriented != 0) &&
+		   *ols == 0 && col_lendiff > 0)
 	    {
 	      /* At the end of a line the characters do not have to
 		 be "inserted".  They can just be placed on the screen. */