aboutsummaryrefslogtreecommitdiffstats
path: root/search.c
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2004-03-23 16:44:02 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2004-03-23 16:44:02 +0000
commitf8ca559c6413a56b778210efddb1d7b631636f09 (patch)
treede4964c95d84fbff081cbaa0297de7a68e2badf2 /search.c
parentrc.c: cleanup LANG==JA (diff)
downloadw3m-f8ca559c6413a56b778210efddb1d7b631636f09.tar.gz
w3m-f8ca559c6413a56b778210efddb1d7b631636f09.zip
fix search problem on different charset page than display charset
* proto.h (conv_search_string): added * search.c (migemostr): use conv_search_string (conv_search_string): added * main.c (srchcore): use conv_search_string (reMark): ditto * menu.c (menu_search_forward): ditto (menu_search_backward): ditto (menu_search_next_previous): ditto From: Fumitoshi UKAI <ukai@debian.or.jp>
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)
{