Fix unicode string issue.
Add tests for unicode string.
Fix line ending issue on the file end after rebasing.
Merge pull request #223 from Jeff-Tian/master

Fix unicode string issue.