當前位置:成語大全網 - 新華字典 - python怎麽將字典的編碼轉換成unicode

python怎麽將字典的編碼轉換成unicode

decode的作用是將其他編碼的字符串轉換成unicode編碼,如str1.decode('gb2312'),表示將gb2312編碼的字符串轉換成unicode編碼。 encode的作用是將unicode編碼轉換成其他編碼的字符串,如str2.encode('gb2312'),表示將unicode編碼的字符串轉換成