I added further improvement to previous patch. If dfaexec() runs in non-UTF8 locales, length and wide character representation are checked for all characters of a line in a input string. However, if matched early in the line, results for remaining characters are wasted. The new patch doesn't reuse both `mblen_buf' and `inputwcs' but stops using them, and checks multibyte characters on demand. It enables to accomplish to speed-up for matched early and reduce required memories. Norihiro