aboutsummaryrefslogtreecommitdiffstats
path: root/search.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--search.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/search.c b/search.c
index 3759c98..4182020 100644
--- a/search.c
+++ b/search.c
@@ -1,4 +1,4 @@
-/* $Id: search.c,v 1.30 2003/09/22 21:02:21 ukai Exp $ */
+/* $Id: search.c,v 1.31 2004/03/23 16:44:02 ukai Exp $ */
#include "fm.h"
#include "regex.h"
#include <signal.h>
@@ -72,7 +72,7 @@ migemostr(char *str)
Strchop(tmp);
if (tmp->length == 0)
goto err;
- return tmp->ptr;
+ return conv_search_string(tmp->ptr, SystemCharset);
err:
/* XXX: backend migemo is not working? */
init_migemo();
@@ -81,6 +81,18 @@ migemostr(char *str)
}
#endif /* USE_MIGEMO */
+#ifdef USE_M17N
+/* normalize search string */
+char *
+conv_search_string(char *str, wc_ces f_ces)
+{
+ if (SearchConv && !WcOption.pre_conv &&
+ Currentbuf->document_charset != f_ces)
+ str = wtf_conv_fit(str, Currentbuf->document_charset);
+ return str;
+}
+#endif
+
int
forwardSearch(Buffer *buf, char *str)
{