hola buen día, tengo un cuadro de texto normal y quiero convertirlo a hexadecimal
tengo la funcion HEX que funciona ok si pongo solo texto por ejemplo
Hola = 68006F006C0061 /// esto va ok
ahora el problema es si pongo un emojis por ejemplo
me devuelve = 003D00D8000A cuando en realidad tendría que devolver : D83DDE0A
los emojis los pongo con el teclado de windows 10 / tecla "Windows + ." la cual tiene emojis
la función que copie de Internet y uso para enviar mensajes SMS x PDU :
Dim MiCadenaDeBytes() As Byte
MiCadenaDeBytes = Text29 ' aca el texto comun
For i = LBound(MiCadenaDeBytes) To (UBound(MiCadenaDeBytes) - 1)
If Not hex(MiCadenaDeBytes(i)) = 0 Then
If hex(MiCadenaDeBytes(i)) = "AC" Then
mensaje = mensaje & "20" & Left(hex(MiCadenaDeBytes(i)), 4)
Else
If hex(MiCadenaDeBytes(i)) = "D" Then
mensaje = mensaje & "000" & Left(hex(MiCadenaDeBytes(i)), 4) '
Else
If hex(MiCadenaDeBytes(i)) = "A" Then
mensaje = mensaje & "000" & Left(hex(MiCadenaDeBytes(i)), 4)
Else
mensaje = mensaje & "00" & Left(hex(MiCadenaDeBytes(i)), 4)
End If
End If
End If
End If
Next
texto30=mensaje ' aca tendria que devolver D83DDE0A la carita