Fixed #3461 : Modify the solution to improve the performance and the compatibility with chinese caracters