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

CodePudding user response:

reference 1st floor renjnet 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 coding

In that case, don't change the Chinese character coding?

CodePudding user response:

refer to the second floor of Asiatic reply:
Quote: refer to 1st floor renjnet 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 coding

In that case, don't change the Chinese character coding?


What are you into a byte, add after 65535 will turn hexadecimal processing, until into byte, to change it doesn't matter,
  •  Tags:  
  • ASP
  • Related