FTP non-ASCII file names (UTF-8) support

Help
2010-02-25
2012-10-08
  • Charbel Choueiri

    I'm running ArecaBackup Version 7.1.6 under Windows 7 64bit and backing up to
    Windows Server 2003 64bit via FileZilla FTP Server.

    When running backup I get the following error on files with non-ASCII
    characters within the file name:

    10-02-25 01:57 - WARNING - An error occurred while storing A/Questionnaire à
    l’intention des directeurs d’école (mai 7, 2007).doc (Socket closed). Retrying
    (attempt 1 of 5) ...
    10-02-25 01:57 - ERROR - RemoteFileOutputStream.close() - Unable to complete
    the remote data transfert
    com.myJava.file.driver.remote.ftp.FTPConnectionException: Error trying to
    complete pending FTP instructions - got the following response from server :
    550 can't access file.
    at com.myJava.file.driver.remote.ftp.FTPProxy.completePendingCommand(FTPProxy.
    java:632)
    at com.myJava.file.driver.remote.RemoteFileOutputStream.close(RemoteFileOutput
    Stream.java:82)
    at java.io.FilterOutputStream.close(Unknown Source)
    at com.myJava.file.EventOutputStream.close(EventOutputStream.java:45)
    at javax.crypto.CipherOutputStream.close(DashoA13*..)
    at com.myJava.file.archive.zip64.DeflaterOutputStream.close(DeflaterOutputStre
    am.java:174)
    at
    com.myJava.file.archive.zip64.ZipOutputStream.close(ZipOutputStream.java:282)
    at com.application.areca.impl.IncrementalDirectoryMedium.storeFileInArchive(In
    crementalDirectoryMedium.java:129)
    at com.application.areca.impl.AbstractIncrementalFileSystemMedium$1.run(Abstra
    ctIncrementalFileSystemMedium.java:1181)
    at com.application.areca.impl.AbstractIncrementalFileSystemMedium.doAndRetry(A
    bstractIncrementalFileSystemMedium.java:1226)
    at com.application.areca.impl.AbstractIncrementalFileSystemMedium.store(Abstra
    ctIncrementalFileSystemMedium.java:1172)
    at com.application.areca.AbstractTarget.processBackup(AbstractTarget.java:340)
    at
    com.application.areca.ActionProxy.processBackupOnTarget(ActionProxy.java:52)
    at com.application.areca.launcher.gui.Application$9.runCommand(Application.jav
    a:1183)
    at com.application.areca.launcher.gui.Application$ProcessRunner.run(Applicatio
    n.java:1665)
    at java.lang.Thread.run(Unknown Source)

    At first I thought it was the French characters à & é but later I found that
    it was ’ character which is not the standard quote but rather another
    character outside the ASCII range: HTML character of ’

    I downloaded ArecaBackup source code, set it up under eclipse and started
    debugging. It seems to all be correct up to the point where it calls a
    function inside org.apache.commons.net.ftp.FTPClient class. So I downloaded
    the source from apache and added it to eclipse and debugged through that. At
    first I thought it was a bug inside org.apache.commons.net.ftp.FTPClient till
    I noticed that the default control encoding is ISO-8859-1 which is set within
    org.apache.commons.net.ftp.FTP.

    At this point it was easy to fix the problem.

    Within com.myJava.file.driver.remote.file.FTPProxy inside the function
    connect() add the following line after "this.client = new..." has been
    created:

    this.client.setControlEncoding("UTF-8");

    This will set the FTP encoding to UTF-8 instead of ISO-8859-1

    I would recommend adding this as an option within the FTP settings GUI. It
    would make sense to make it default but some FTP server do not support UTF-8
    command encoding.

    Hope this was helpful to anyone with the same issue.

    PS: I love ArecaBackup.

     
  • brandeau anthony

    Hello,
    I have the same problem but I m not able to download source and modify it and
    generate a new exe

    is it a new version with correction?

    thanks in advance

     
  • aventin

    aventin - 2010-03-12

    @charbelchoueiri : thanks for pointing out (and investigating) this problem
    ... I'll add the fix in the next version of Areca
    @abrandeau : the next version will probably be available within the next 2
    months

    Best regards

     
  • Cedric

    Cedric - 2010-06-02

    Hello,
    was this fix included in the latest version (7.1.7) ?
    I don't see any option in the FTP settings GUI to change the encoding ....

     
  • aventin

    aventin - 2010-06-04

    Hi and many thanks to Charbel for reporting the problem and the appropriate
    fix.
    I've just integrated it into Areca ... it will be delivered with the next
    version (7.1.8)

     

Log in to post a comment.