Fix UTF-8 bug and regexp