This content has been marked as final. Show 2 replies
Currently there's no API for that.
You may try, with HTTP headers or GET parameters or whatever, to get the server report correct encoding for you.
this page is encoded by utf-8 <meta charset="utf-8" />
but when type something in the textbox, it's a ajax recall. http://map.baidu.com/su?wd=ab&cid=131&type=0&newmap=1&b=%2812915600.97,4825427.72;13000720.97,4850323.72%29&t=1365477546776
which return a json object. it's encoded also by utf-8.
but I paste this url in firefox or chrome. it's wrongly displayed. I have to manully select utf-8 and it's correct.
as far as I know, mainstream browser such as ie, ff and chrome have the ability to "detect charset/encoding".
I guess if the encoding is not specified explicityly, javafx webview will use system's default encoding. I am in windows 7, so it use gbk for Chinese. so it's wrong.