M
mtp
Hello,
i work on linux/gnome (jdk1.4.2_10 to compile, jdk 1.5.0_07 to run), and
when i drag and drop a file whose name is ("données.xls") on my java
application i accept the Drop with DataFlavor:
java.awt.datatransfer.DataFlavor[mimetype=application/x-java-serialized-object;representationclass=java.lang.String]
the drop data is "file:///home/user/.../donn%E9es.xls\r\n"
I drop the "\r\n", and i try to decode the %xx :
URI uri = new URI(filename);
String decodedPath = uri.getPath();
but the decoded path is: "/home/user/.../donn�es.xls"
So i guess it's a Charset problem but what can i do to solve it?
In short:
- "ls" and gnome explorer shows "données.xls"
- the drop data is "donn%E9es.xls"
- the decoded path is "donn�es.xls"
Does anyone know how to solve this?
TIA
i work on linux/gnome (jdk1.4.2_10 to compile, jdk 1.5.0_07 to run), and
when i drag and drop a file whose name is ("données.xls") on my java
application i accept the Drop with DataFlavor:
java.awt.datatransfer.DataFlavor[mimetype=application/x-java-serialized-object;representationclass=java.lang.String]
the drop data is "file:///home/user/.../donn%E9es.xls\r\n"
I drop the "\r\n", and i try to decode the %xx :
URI uri = new URI(filename);
String decodedPath = uri.getPath();
but the decoded path is: "/home/user/.../donn�es.xls"
So i guess it's a Charset problem but what can i do to solve it?
In short:
- "ls" and gnome explorer shows "données.xls"
- the drop data is "donn%E9es.xls"
- the decoded path is "donn�es.xls"
Does anyone know how to solve this?
TIA