D
Douglas Gennetten
I am trying to convert strings into a character list of Unicode values. For
example,
"NULL" converts to " 0x004E, 0x0055, 0x004C, 0x004C, 0 "
I have this working fine for ASCII strings (see below) but need to do the
same for Asian languages. How can I do this for all languages?
Thanks,
Douglas Gennetten
---
I created the following function to do this conversion by pulling out one
character at a time from the string and doing an operation on that character
to get the ascii equivalent.
Function HEXEDASCII(asciiString As String) As String
Const COMMA As String = ","
Dim i As Long
Dim sOut As String
For i = 1 To Len(asciiString)
If ((i - 1) Mod 8 = 0) Then sOut = sOut & vbCrLf & " "
sOut = sOut & "0x" & _
Right("0000" & Hex(Asc(Mid(asciiString, i, 1))), 4) _
& COMMA & " "
Next i
HEXEDASCII = sOut & "0" & vbCrLf
End Function
example,
"NULL" converts to " 0x004E, 0x0055, 0x004C, 0x004C, 0 "
I have this working fine for ASCII strings (see below) but need to do the
same for Asian languages. How can I do this for all languages?
Thanks,
Douglas Gennetten
---
I created the following function to do this conversion by pulling out one
character at a time from the string and doing an operation on that character
to get the ascii equivalent.
Function HEXEDASCII(asciiString As String) As String
Const COMMA As String = ","
Dim i As Long
Dim sOut As String
For i = 1 To Len(asciiString)
If ((i - 1) Mod 8 = 0) Then sOut = sOut & vbCrLf & " "
sOut = sOut & "0x" & _
Right("0000" & Hex(Asc(Mid(asciiString, i, 1))), 4) _
& COMMA & " "
Next i
HEXEDASCII = sOut & "0" & vbCrLf
End Function