commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jürgen Jung (Commented) (JIRA) <j...@apache.org>
Subject [jira] [Commented] (NET-436) Support for SYST "Mac OS" listing
Date Thu, 05 Jan 2012 08:43:39 GMT

    [ https://issues.apache.org/jira/browse/NET-436?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13180246#comment-13180246
] 

Jürgen Jung commented on NET-436:
---------------------------------

Listing looks good except Encoding Problems on f***ing german umlauts.

Expected listing:
{noformat}-rw-r--r--    58679       60393   119072 Jul 22  2010 Präˆsentation.jpg{noformat}

Example listing with auto detect encoding:
{noformat}-rw-r--r--    58679       60393   119072 Jul 22  2010 Präsentation.jpg{noformat}

Example with {{ftpClient.setControlEncoding("MacRoman");}}:
{noformat}-rw-r--r--    58679       60393   119072 Jul 22  2010 PraÃàsentation.jpg{noformat}

Example with {{ftpClient.setControlEncoding("MacRoman");}} and string encoding {{new String(file.getRawListing().getBytes("MacRoman"),"UTF-8")}}:
Works as expected:
{noformat}-rw-r--r--    58679       60393   119072 Jul 22  2010 Präsentation.jpg{noformat}


Example Client:
{code:java}
public static void main(String[] args) throws Exception {
        FTPClient ftpClient = new FTPClient();
        ftpClient.setControlEncoding("MacRoman");
        ftpClient.connect("172.30.201.94");
        ftpClient.login("test", "test");

        FTPFile[] files = ftpClient.listFiles();
        for (FTPFile file : files) {
            System.out.println(new String(file.getRawListing().getBytes("MacRoman"),"UTF-8"));
            System.out.println(file.getRawListing());
        }
        ftpClient.disconnect();
}
{code} 
                
> Support for SYST "Mac OS"  listing
> ----------------------------------
>
>                 Key: NET-436
>                 URL: https://issues.apache.org/jira/browse/NET-436
>             Project: Commons Net
>          Issue Type: New Feature
>          Components: FTP
>    Affects Versions: 3.0.1
>         Environment: Mac OS X Rumpus FTP Sevrer
>            Reporter: Jürgen Jung
>
> The Rumpus ftp server acts as an "old" pre mac os x ftp server.
> There are any plans do integrate a Mac OS filelist parsing into the commons net project?
> http://cyberduck.ch/ implemnets his own Rumpus parser, 
> but it will be great if commons net already support this kind of listing.  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Mime
View raw message