Reputation: 1803
Is there a simple way to get or detect FTP server file name encoding using Apache Commons Net?
Why FileZilla client can always get right encoding and show right file name? How does it do that?
Upvotes: 0
Views: 1037
Reputation: 202360
There's no way to find out, what encoding does the server use.
I do not even think that FileZilla can always show the right file name.
See https://wiki.filezilla-project.org/Character_Encoding
Having that said, you may consider these:
OPTS UTF8 ON
command to the FTP server at the beginning of session, to try to force the server use UTF-8 encoding. IIS or ProFTPD servers respond to this.Upvotes: 2