Home > front end > Why should a character encoding plus 65535?
Why should a character encoding plus 65535?
Time:09-20
See this function on the Internet to understand iCode=iCode + 65535, why do you want to add 65535?
The function toByte (Str) Dim I, iCode, c, iLow, iHigh ToByte="" For I=1 To Len (Str) C=mid (Str, I, 1) ICode=Asc (c) 'the response. The Write (iCode&" " ) If iCode<0 Then iCode=iCode + 65535 If iCode> Then 255 ILow=Left (Hex (Asc) (c), 2) IHigh=Right (Hex (Asc) (c), 2) ToByte=toByte & amp; ChrB (" & amp; H "& amp; ILow) & amp; ChrB (" & amp; H "& amp; IHigh) The Else ToByte=toByte & amp; ChrB (AscB (c)) End the If Next End the function
CodePudding user response:
ICode=Asc (c) read the characters here Asc code, if it is Chinese characters, this value is negative, then you need to add 65535, to get his code