Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
New Contributor
Mageno
Posts: 3
Registered: ‎04-16-2014
My Device: Blackberry Q10
My Carrier: Megafon

Read file with special symbol in name

I read the file in Cordova. If I read the file without special characters, it's all right. If I'm reading a file with a special character (ex. Autónomo.txt), then I get the error NOT_FOUND_ERR. How to read a file with special characters in Cordova?

 

Source code:

 


window.webkitRequestFileSystem(window.PERSISTENT, 1024 * 1024 * 1024, function (fs) {  
      fs.root.getFile(FILE_PATH, null, function (entry) {
                entry.file(function (file) {
                     var reader = new FileReader();
                     reader.onloadend = function (e) {
                              dataArrayForRead = this.result;
                              FILE_SIZE = dataArrayForRead.byteLength;
                              addRecent(FILE_PATH);
                              console.log('buffer length: ' + dataArrayForRead.byteLength);
                     };
                    reader.onerror = function(e) {

                               alert(reader.error.code);
                    };


                    reader.readAsArrayBuffer(file);
          }, function (error) {
                alert(error.code);
          });
}, function (error) {
alert(error.code);
});
});

 

Please use plain text.
BlackBerry Development Advisor
oros
Posts: 1,557
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: Read file with special symbol in name

This may be a limitation of the API.

As it appears you have a straightforward test-case, I would recommend reporting this through JIRA:
https://www.blackberry.com/jira/secure/Dashboard.jspa

Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Please use plain text.