python trans encoding