ramonlopesb / opendedup

Automatically exported from code.google.com/p/opendedup
0 stars 0 forks source link

Files with unicode characters not working #34

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. touch <path to sdfs mount>/à (or any filename with unicode characters in it)
2. see the error
3.

What is the expected output? What do you see instead?
It should simply create the file. Files with unicode characters are not 
created. The same happens when unzipping/untarring files from smb/nfs mounts to 
sdfs. This issue is very annoying, italian, french, spanish, portuguese 
speaking people (and many others) make a wide use of special characters in 
filenames.

What version of the product are you using? On what operating system?
1.0.1 (latest as of 20110304) - Ubuntu 10.10

Please provide any additional information below.
My Command:
touch /mnt/sdfs/à

My Error:
14:09:33.952 Thread-9 ERROR [fuse.SDFS.SDFSFileSystem]: 
java.nio.file.InvalidPathException: Malformed input or input contains 
unmappable chacraters: /opt/sdfs/volumes/sdfs/files/?
java.nio.file.InvalidPathException: Malformed input or input contains 
unmappable chacraters: /opt/sdfs/volumes/sdfs/files/?
        at sun.nio.fs.UnixPath.encode(UnixPath.java:153)
        at sun.nio.fs.UnixPath.<init>(UnixPath.java:75)
        at sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:268)
        at sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:41)
        at java.nio.file.Paths.get(Paths.java:69)
        at fuse.SDFS.SDFSFileSystem.getFtype(SDFSFileSystem.java:569)
        at fuse.SDFS.SDFSFileSystem.getattr(SDFSFileSystem.java:150)
        at fuse.Filesystem3ToFuseFSAdapter.getattr(Filesystem3ToFuseFSAdapter.java:63)
14:09:33.954 Thread-10 ERROR [fuse.SDFS.SDFSFileSystem]: 
java.nio.file.InvalidPathException: Malformed input or input contains 
unmappable chacraters: /opt/sdfs/volumes/sdfs/files/?
java.nio.file.InvalidPathException: Malformed input or input contains 
unmappable chacraters: /opt/sdfs/volumes/sdfs/files/?
        at sun.nio.fs.UnixPath.encode(UnixPath.java:153)
        at sun.nio.fs.UnixPath.<init>(UnixPath.java:75)
        at sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:268)
        at sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:41)
        at java.nio.file.Paths.get(Paths.java:69)
        at fuse.SDFS.SDFSFileSystem.getFtype(SDFSFileSystem.java:569)
        at fuse.SDFS.SDFSFileSystem.getattr(SDFSFileSystem.java:150)
        at fuse.Filesystem3ToFuseFSAdapter.getattr(Filesystem3ToFuseFSAdapter.java:63)
touch: cannot touch `/mnt/sdfs/\340': Bad address

Original issue reported on code.google.com by all...@gmail.com on 4 Mar 2011 at 1:13

GoogleCodeExporter commented 8 years ago
I found a solution to this problem.
It seems a Java-related issue regarding the system language setting, when I 
mount the sdfs volume (thru rc.local) LANG is not set, while it is 
LANG=it_it.UTF-8 when the system is up und running. I just put this "export" 
statement before my mount statement:

export LANG=it_IT.UTF-8
mount.sdfs sdfs /mnt/sdfs 2>&1 1>>/var/log/sdfs.log &

and now it works perfectly

Another woorkaround might be setting the "-Dfile.encoding=UTF-8" java parameter 
in the mount.sdfs script.

I'd say issue is solved
ciao

Original comment by all...@gmail.com on 11 Mar 2011 at 3:04