var url = transferUtils.retrieveURLFromData(data,data,
data.flavour.contentType);
nsDragAndDrop.dragDropSecurity( event,session,url);
var p = parseUri(url)
var aFile = Cc[local].......
aFile.initWithPath(p.path);
-----------------------------------------------
var url looks like 是.png
file:///home/user/Desktop/%E6%98%AF.png
when initWithPath is invoked it can not find that file.
How do I convert utf8 => nsURI or something like that
shaun
I suggest using the mozilla.dev.extensions newsgroup for this question.
If you have a file URI, you can turn it into a local file easily:
var uri = parseUri(url);
var file = uri.QueryInterface(Ci.nsIFileURL).file;
See
http://mxr.mozilla.org/mozilla-central/source/netwerk/base/public/nsIFileURL.idl
--BDS