Use sencode rather than encode("utf-8"). Fixes #202