I know that Java have a method that can manually encode string, like that, System.out.println(new String("some chinese char".getBytes()"GB2312")) Is there any python function or method can do the same work? Thanks for any help! Kick