fix #345
fix #347
use unicode
Merge pull request #348 from xiechao06/issue347

Issue347