I need to mirror files from an FTP server to a local machine, but some files/directories have special characters on it, e.g:
print(ftp.nlst()) >>{\'Mar
Assuming the filenames are in UTF-8 encoding, in Python 3, this should do:
ftp.encoding = "UTF-8" print(ftp.nlst())