java - Can not read Japanese content from Wiki -


i trying use below code read japanese content wiki

clientconfig clientconfig = new defaultclientconfig(); client = client.create(clientconfig); webresource webresource = client.resource("http://ja.wikipedia.org/w/api.php?format=json&action=query&titles=akb48&rvprop=content&prop=revisions"); string s  = webresource.get(string.class);           system.out.println(s); 

and result

{"query":{"pages":{"2276803":{"pageid":2276803,"ns":0,"title":"akb48","revisions":[{"contentformat":"text/x-wiki","contentmodel":"wikitext","*":"{{otheruseslist|\u65e5\u672c\u306e\u5973\u6027\u30a2\u30a4\u30c9\u30eb\u30b0\u30eb\u30fc\u30d7.... 

it shows \uxxx rather real japanese words. know must encoding issue. still can not make works.

any appreciated.

that looks entirely reasonable json me. java, json uses \u escape sequences represent characters. don't think encoding issue @ all.

i suggest find json parser api like, plug string that, , you'll able fetch "unescaped" values.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -