DHW Posted August 13, 2015 Share 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 Link to comment Share on other sites More sharing options...
DHW Posted August 13, 2015 Author Share Posted August 13, 2015 The output of the script: AutoitOutput.JPG Link to comment Share on other sites More sharing options...
diandiand163 Posted May 14, 2016 Share Posted May 14, 2016 我也遇到这样的问题,不知道怎么解决?会丢失字符,依然有乱码? Link to comment Share on other sites More sharing options...
Developers Jos Posted May 14, 2016 Developers Share 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. Link to comment Share on other sites More sharing options...
diandiand163 Posted May 15, 2016 Share Posted May 15, 2016 高手都在干嘛,为什么没来解决啊? Link to comment Share on other sites More sharing options...
Developers Jos Posted May 15, 2016 Developers Share 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. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now