python ftplib中文乱码,其中一种解决方法

def Change_To_Simple_Chinese(self,otherLanguage):#变成中文

        item=otherLanguage.encode('iso-8859-1').decode('gbk')

        return item

def Change_To_Latin_language(self,simple_language):

        item=simple_language.encode('gbk').decode('iso-8859-1')

        return item

根据:http://www.linuxidc.com/Linux/2014-10/107585.htm 的启发写出本博客

猜你喜欢

转载自blog.csdn.net/play_841266670/article/details/81192575