Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/77.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 在Windows RT上使用phonegap上载mp3文件[Unicode映射错误]_Javascript_Jquery_Windows 8_Visual Studio 2012_Cordova - Fatal编程技术网

Javascript 在Windows RT上使用phonegap上载mp3文件[Unicode映射错误]

Javascript 在Windows RT上使用phonegap上载mp3文件[Unicode映射错误],javascript,jquery,windows-8,visual-studio-2012,cordova,Javascript,Jquery,Windows 8,Visual Studio 2012,Cordova,我使用phogap功能录制音频并上传音频、文件。 音频文件正在录制并存储在音乐文件夹中,我通过下面的函数获取文件的路径和名称 function captureSuccess(mediaFiles) { var i, len; for (i = 0, len = mediaFiles.length; i < len; i += 1) { uploadFile(mediaFiles[i]);

我使用phogap功能录制音频并上传音频、文件。 音频文件正在录制并存储在音乐文件夹中,我通过下面的函数获取文件的路径和名称

 function captureSuccess(mediaFiles) {
            var i, len;
            for (i = 0, len = mediaFiles.length; i < len; i += 1) {
                uploadFile(mediaFiles[i]);
            }
            alert('over');
        }
        function captureAudio() {
            navigator.device.capture.captureAudio(captureSuccess, captureError, { limit: 1, duration: 10 });

        }
        function uploadFile(mediaFile) {
            var ft = new FileTransfer(),
                path = mediaFile.fullPath,
                name = mediaFile.name;
            temp = path;  //Assigned path to GLOBAL VARIABLE
            temp1 = name;
            alert(temp);
        }   
但是在运行时,我遇到了这些错误,被卡住了,错误是URL还是路径?Unicode?文件的路径是这样的

C:/Users/AB/Music/captureAudio (4).mp3

 0x80070459 - JavaScript runtime error: No mapping for the Unicode character exists in the target multi-byte code page.

WinRT information: No mapping for the Unicode character exists in the target multi-byte code page.

我通过使用Ajax post和以数组的形式使用
Formdata()
服务器得到了答案

C:/Users/AB/Music/captureAudio (4).mp3

 0x80070459 - JavaScript runtime error: No mapping for the Unicode character exists in the target multi-byte code page.

WinRT information: No mapping for the Unicode character exists in the target multi-byte code page.