add encoding for python 3.x
Merge pull request #2 from felixonmars/fix-py3

add encoding for python 3.x