Hello everyone!
       It's my first post and i have a problem while using GOOGLE AJAX
API..... I made a small java web tool using tomcat and json. It's
pretty simple u just type in the key word and search the images with
AJAX APIs.
And get JSON response from google and analyse the result using JSON
method and print out the image to the web page.
       Now the thing is that whenever i type in Chinese Character and
search images, i did get the JSON format results from AJAX API, but
since the results contain "Chinese Character" i can't parse them
correctly in Chinese and just got things like that....

{"responseData": {"results":[],"cursor":{"moreResultsUrl":"http://
www.google.com/images?oe\u003dutf8\u0026ie\u003dutf8\u0026source\u003duds\u0026start\u003d0\u0026hl\u003den\u0026q\u003d%EF%BF%BD%EF%BF%BD%EF%BF%BD%EF%BF%BD"}},
"responseDetails": null, "responseStatus": 200}

and it should be like this instead...

{"responseData": {"results":
[{"GsearchResultClass":"GimageSearch","width":"2065","height":"2165","imageId":"ANd9GcRDtBBauZgeJ0MfEBbUu3_FAn8Uxq1bwajDq7XqKnNDj9m0y5oBm0ZFH-8R","tbWidth":"143","tbHeight":"150","unescapedUrl":"http://
www.gov.cn/jingtai/map/3482.jpg","url":"http://www.gov.cn/jingtai/map/3482.jpg","visibleUrl":"news.xinhuanet.com","title":"\u003cb\u003e中国\u003c/b\u003e概况","titleNoFormatting":"中国概况","originalContextUrl":"http://news.xinhuanet.com/ziliao/2003-01/22/content_701938.htm","content":"\u003cb\u003e中国\u003c/b\u003e概况","contentNoFormatting":"中国概况","tbUrl":"http://t0.gstatic.com/images?q\u003dtbn:ANd9GcRDtBBauZgeJ0MfEBbUu3_FAn8Uxq1bwajDq7XqKnNDj9m0y5oBm0ZFH-8R"},{"GsearchResultClass":"GimageSearch","width":"544","height":"447","imageId":"ANd9GcSJt3vU_y5Em1KFd3P25Y5leyMDnWbfQHP8tzFdoxo6tF4MwgEJzOP2uCNQ","tbWidth":"133","tbHeight":"109","unescapedUrl":"http://destpic.ctrip.com/Resources/map/new/map_china.gif","url":"http://destpic.ctrip.com/Resources/map/new/map_china.gif","visibleUrl":"cctv.destguides.ctrip.com","title":"\u003cb\u003e中国\u003c/b\u003e景区景点导航-
携程旅行网","titleNoFormatting":"中国景区景点导航- 携程旅行
网","originalContextUrl":"http://cctv.destguides.ctrip.com/Destinations/
ChinaNavigation.aspx","content":"\u003cb\u003e中国\u003c/b\u003e旅游导
航","contentNoFormatting":"中国旅游导航","tbUrl":"http://t2.gstatic.com/
images?q
\u003dtbn:ANd9GcSJt3vU_y5Em1KFd3P25Y5leyMDnWbfQHP8tzFdoxo6tF4MwgEJzOP2uCNQ"},
{"GsearchResultClass":"GimageSearch","width":"1920","height":"1200","imageId":"ANd9GcQ5uEWsjT-
MJHSPGqnoFFILB5nZ8CPNNHKl_BrPluLPqzk2Xt-
RpG7Io4o","tbWidth":"150","tbHeight":"94","unescapedUrl":"http://
www.stumbleuponyang.org/collection/China.png","url":"http://www.stumbleuponyang.org/collection/China.png","visibleUrl":"www.stumbleuponyang.org","title":"\u003cb\u003e中国\u003c/b\u003e国旗、\u003cb\u003e中国\u003c/b\u003e香港区旗、\u003cb\u003e中国\u003c/b\u003e澳门区旗|
High resolution national \u003cb\u003e...\u003c/b
\u003e","titleNoFormatting":"中国国旗、中国香港区旗、中国澳门区旗| High resolution
national ...","originalContextUrl":"http://www.stumbleuponyang.org/
collection/chinaflags.html","content":"\u003cb\u003e中国\u003c/b\u003e国旗、
\u003cb\u003e中国\u003c/b\u003e香港区旗、\u003cb\u003e中国\u003c/b
\u003e","contentNoFormatting":"中国国旗、中国香港区旗、中国","tbUrl":"http://
t0.gstatic.com/images?q\u003dtbn:ANd9GcQ5uEWsjT-
MJHSPGqnoFFILB5nZ8CPNNHKl_BrPluLPqzk2Xt-RpG7Io4o"},
{"GsearchResultClass":"GimageSearch","width":"370","height":"313","imageId":"ANd9GcQKGcuoXS_GPgq7lSp0FbeG3xMYU49O04uLfuOZ9ibhF-
iCQWdSHK0g7A","tbWidth":"122","tbHeight":"103","unescapedUrl":"http://
map.mapbar.com/map/images/china.jpg","url":"http://map.mapbar.com/map/
images/china.jpg","visibleUrl":"map.mapbar.com","title":"\u003cb\u003e中
国\u003c/b\u003e地图查询- 图吧(mapbar)\u003cb\u003e中国\u003c/b\u003e地
图","titleNoFormatting":"中国地图查询- 图吧(mapbar)中国地
图","originalContextUrl":"http://map.mapbar.com/","content":"\u003cb
\u003e中国\u003c/b\u003e地图","contentNoFormatting":"中国地图","tbUrl":"http://
t2.gstatic.com/images?q
\u003dtbn:ANd9GcQKGcuoXS_GPgq7lSp0FbeG3xMYU49O04uLfuOZ9ibhF-
iCQWdSHK0g7A"}],"cursor":{"pages":[{"start":"0","label":1},
{"start":"4","label":2},{"start":"8","label":3},{"start":"12","label":
4},{"start":"16","label":5},{"start":"20","label":6},
{"start":"24","label":7},{"start":"28","label":
8}],"estimatedResultCount":"1770000000","currentPageIndex":
0,"moreResultsUrl":"http://www.google.com/images?oe\u003dutf8\u0026ie
\u003dutf8\u0026source\u003duds\u0026start\u003d0\u0026hl\u003dzh-CN
\u0026q\u003d%E4%B8%AD%E5%9B%BD"}}, "responseDetails": null,
"responseStatus": 200}
AND I JUST CAN'T GET IT RIGHT!
SO IS THERE ANY WAY THAT I ONLY GET THE JSON results WITH ONLY "url"
VALUE AND NO MORE CHINESE CHARACTER ....THEY'RE DRIVING ME CRAZY!!!

-- 
You received this message because you are subscribed to the Google
Groups "Google AJAX APIs" group.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
To view this message on the web, visit
http://groups.google.com/group/google-ajax-search-api?hl=en_US
For more options, visit this group at
http://groups.google.com/group/google-ajax-search-api?hl=en?hl=en

Reply via email to