1. Implementation under VB6: DIM STR1 AS STRING
DIM STR2 AS STRING
Str = "Han" 'double-by-string
Dim Array () AS BYTE 'byte array
Arr = strConv (str1, vbfromunicode) 'removes extra bytes into array
Str2 = strconv (array, vbunicode) 'turn back
Second, VB.NET implementation:
DIM STR AS STRING = "Han" DIM Array () as Byte
Array = system.text.Encoding.default.getbytes (STR)