Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/406.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 谷歌RSS API字符集UTF-8_Javascript_Utf 8_Character Encoding_Rss_Google Api - Fatal编程技术网

Javascript 谷歌RSS API字符集UTF-8

Javascript 谷歌RSS API字符集UTF-8,javascript,utf-8,character-encoding,rss,google-api,Javascript,Utf 8,Character Encoding,Rss,Google Api,我想在我的jquery移动应用程序上使用非英语字符,并且我想将UTF-8字符集应用于从Google RSS API返回的结果。我搜索了很多网站,但找不到正确答案。我认为应用于谷歌rss结果的字符集是不正确的(我选中了,它显示为null),这就是为什么我看不到非英语字符的原因 请参阅下面的代码- $.ajax({ url: "http://ajax.googleapis.com/ajax/services/xxxxxxxxx,

我想在我的jquery移动应用程序上使用非英语字符,并且我想将UTF-8字符集应用于从Google RSS API返回的结果。我搜索了很多网站,但找不到正确答案。我认为应用于谷歌rss结果的字符集是不正确的(我选中了,它显示为null),这就是为什么我看不到非英语字符的原因

请参阅下面的代码-

           $.ajax({
            url: "http://ajax.googleapis.com/ajax/services/xxxxxxxxx,
            dataType: "json",
            contentType: "application/x-www-form-urlencoded;charset=utf-8",
                success: function (d) {

                _execute();
                },

或者有没有办法将UTF-8字符集应用于javascript字符串/数组

那么,您是从请求返回
null
,还是对象属性显示为
null
\u execute()
的作用是什么?还要检查您的URL是否正确。URL已分条。URL是正确的bcz我正确地获得了英语结果,但当需要印地语字符时会得到垃圾字符。我还使用函数success检查了内容类型:函数(d,status,xhr){alert(xhr.getResponseHeader(“内容类型”);_execute();}是的,我在警报框中得到null。值为null或xhr对象为null。它为xhr.getAllResponseHeaders()显示空白值。我严重无法重现此结果,请访问maktoob.yahoo.com,包括jQuery,然后使用
$.ajax()http://maktoob.yahoo.com“,{success:function(a,b,c){console.log(a,b,c);console.log(c.getAllResponseHeaders(),c.getResponseHeader('content-type');}};
工作正常。