Paul, Thanks very match. I checked the patch, and I add fixes to it as following. 1. Fixed warning. dfa.c: In function 'build_mbrtowc_cache': dfa.c:448: warning: pointer targets in passing argument 1 of 'mbrtowc' differ in signedness 2. took mbrtowc_cache into new member of struct dfa. When struct dfa more than one are used at the same time, mbrtowc cache may be conflict. So, take mbrtowc_cache into new member of struct dfa, and define each mbrtowc cache for them. Norihiro