[jira] Created: (VFS-223) JAPANESE AND CHINESE CHARACERED FILENAME GETS GARBLED WHEN REMOTE COPY IS DONE

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (VFS-223) JAPANESE AND CHINESE CHARACERED FILENAME GETS GARBLED WHEN REMOTE COPY IS DONE

Gary D. Gregory (Jira)
JAPANESE AND CHINESE CHARACERED FILENAME GETS GARBLED WHEN REMOTE COPY IS DONE
------------------------------------------------------------------------------

                 Key: VFS-223
                 URL: https://issues.apache.org/jira/browse/VFS-223
             Project: Commons VFS
          Issue Type: Bug
         Environment: WINDOWS,LINUX
            Reporter: Shobha C


When I tried to transfer a folder containing filenames in Chinese/Japanese characters from one Chinese/Japanese system to another:
1. Files in folder would get transferred with garbled/corrupted filenames.
2. The folder wouldnt get created.

Code :

______________________________________________________________________
public static final void copy(String sourceDir, String sourceFile,
                FileSystemOptions sourceOpts, String targetDir, String targetFile,
                FileSystemOptions targetOpts, FileSystemManager fsManager)
                throws FileSystemException {
...........
        try {
                if (sourceFile == null) {
                        sourceFileUrl = sourceDir;
                        sourceFileObject = fsManager.resolveFile(sourceFileUrl, sourceOpts);

                        targetFileUrl = targetDir + File.separator
                                        + sourceFileObject.getName().getBaseName();

                        targetFileObject = (FileObject) fsManager.resolveFile(
                                        targetFileUrl, targetOpts);

                if (sourceFile == null || targetFile != null) {
                                // copy directory to directory recursively or copy regular file
                                // to file
                                targetFileObject.copyFrom(sourceFileObject,
                                                new AllFileSelector());
}
______________________________________________________________________

Could you please let me know whether we need to set any options to enable it to transfer multi-byte chractered languages like Japanese/Chinese?



--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.