python - FTP filename encoding -
hi use twisted library connect ftp server have problem filename encoding. receive 'illusion-n\xf3z.txt' not unicode. there ftp command force specific encoding? in advance! mk
there 2 possibilities:
- ftp not unicode aware. looks server you're talking in example sending latin-1 encoded bytes. need decode bytes using encoding when receive them.
- there an rfc updates ftp utf-8-aware. check results of
feat
command see ifutf8
there (but isn't, since example bytes not valid utf-8). if is, decode bytes using utf-8.
twisted's ftp client won't unicode-related it, since implements basic ftp rfc.
Comments
Post a Comment