If you need utf-8 format, please change the following GB2312 to utf-8 by yourself.
'Turn binary to string, otherwise garbled will appear!
FunctionsTb(vin)
ConstadTypeText=2
DimBytesStream,StringReturn
SetBytesStream=Server.CreateObject("ADODB.Stream")
WithBytesStream
.Type=adTypeText
.Open
.WriteTextvin
.Position=0
.Charset="GB2312"
.Position=2
StringReturn=.ReadText
.Close
EndWith
SetBytesStream=Nothing
sTb=StringReturn
EndFunction
Articles that may be of interest to you:
C# Simple method to convert Unicode encoding to Chinese character string python convert Javascript %u string to python unicode code golang implements unicode conversion to string string string string implementation implementation method conversion between string and Unicode encoding in JavaScript implementation method JavaScript string object fromCharCode method introduction example (used to convert Unicode values to string) Java String string and Unicode character mutual conversion code to solve the problem of not being able to convert between unicode and non-unicode string data types JS literal string conversion unicode encoding function js string and Unicode encoding conversion