Chinese char bug when use XMLHTTP ,Baidu Map API

var xhr = new XMLHttpRequest();
    xhr.open("GET", "http://api.map.baidu.com/geocoder/v2/?ak=A29f7ab85cd500b858369b6b59882d67&callback=&location=31.701435628212,118.51260536711&output=json&pois=0");
    sys.garbageCollect();
    xhr.onreadystatechange = function() {
        var response = xhr.responseText;
        cc.log("status: " + xhr.status +" Response: "+ response);
    }

    xhr.send();
    sys.garbageCollect();

Cocos2d: JS: status: 200 Response: {status


image.jpg (21.0 KB)


image.jpg (3.5 KB)

I’ve already fix this problem and send pull request on Github,
but still not get merge to master branch.
Please refer it:

https://github.com/cocos2d/cocos2d-x/pull/3855


is the same problem ?

Simon Pan wrote:

I’ve already fix this problem and send pull request on Github,
but still not get merge to master branch.
Please refer it:
[…]

Simon Pan wrote:

I’ve already fix this problem and send pull request on Github,
but still not get merge to master branch.
Please refer it:
[…]

And this problem:

I fixed this bug:

jsval charptr_to_jsval( JSContext *cx, const char *str)
{
    //JSString *ret_obj = JS_NewStringCopyZ(cx, str);
    //return STRING_TO_JSVAL(ret_obj);
    jsval tmpval = c_string_to_jsval(cx, str);
    return tmpval;
}