DHW 0 Posted August 13, 2015 (edited) I got problem retrieving UTF-8 Chinese textcontent from webpage.<a href="/index/XAU.php">費城金銀</a>#Include <FF.au3> _FFConnect() $sExpect= "費城金銀" ;the expected result $sReturn=_FFXPath("//a[@href = '/index/XAU.php']","textContent",2) msgbox(4096, "", "$sExpect" & @crlf & $sExpect & @crlf & @crlf & _ "$sReturn" & @crlf & $sReturn & @crlf & @crlf & _ "binaryToString(stringToBinary($sReturn,1),4)" & @crlf & binarytostring(stringToBinary($sReturn,1),4)& @crlf & @crlf & _ ;convert it back to UTF-8, but only 1 character is correct. "binaryToString(stringToBinary(binaryToString(stringToBinary($sExpect,4),1),1),4)" & @crlf & binarytostring(stringtobinary(binarytostring(stringToBinary($sExpect,4),1),1),4)) ;simulate the error.Does anybody know the way to retrieve textcontent in UTF-8 directly instead of ANSI?Thanks for your help! Edited August 29, 2015 by DHW Share this post Link to post Share on other sites
DHW 0 Posted August 13, 2015 The output of the script: AutoitOutput.JPG Share this post Link to post Share on other sites
diandiand163 0 Posted May 14, 2016 我也遇到这样的问题,不知道怎么解决?会丢失字符,依然有乱码? Share this post Link to post Share on other sites
Jos 2,164 Posted May 14, 2016 Please try to stick to English: Quote I have encountered this problem, I do not know how to solve? Character is lost, there is still garbled? Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Share this post Link to post Share on other sites
diandiand163 0 Posted May 15, 2016 高手都在干嘛,为什么没来解决啊? Share this post Link to post Share on other sites
Jos 2,164 Posted May 15, 2016 (edited) 2 hours ago, diandiand163 said: 高手都在干嘛,为什么没来解决啊? Masters are doing, why not to solve ah? Sigh .. ENGLISH PLEASE! (请说英语!) Edited May 15, 2016 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Share this post Link to post Share on other sites