diff options
author | Fumitoshi UKAI <ukai@debian.or.jp> | 2004-03-23 16:44:02 +0000 |
---|---|---|
committer | Fumitoshi UKAI <ukai@debian.or.jp> | 2004-03-23 16:44:02 +0000 |
commit | f8ca559c6413a56b778210efddb1d7b631636f09 (patch) | |
tree | de4964c95d84fbff081cbaa0297de7a68e2badf2 /search.c | |
parent | rc.c: cleanup LANG==JA (diff) | |
download | w3m-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 'search.c')
-rw-r--r-- | search.c | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -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) { |