Private Function GetUTF8Code(ByVal sUnicode As String, Optional ByVal fUTFCode As Boolean = False) As Variant
Dim i As Long
Dim lLength As Long
Dim lBufferSize As Long
Dim lResult As Long
Dim bUTF8() As Byte
GetUTF8Code = ""
lLength = Len(sUnicode)
If lLength = 0 Then Exit Function
If lResult <> 0 Then
lResult = lResult - 1
ReDim Preserve bUTF8(lResult)
If fUTFCode Then
For i = LBound(bUTF8) To UBound(bUTF8)
GetUTF8Code = GetUTF8Code & Hex(bUTF8(i))
Next
Else
GetUTF8Code = bUTF8
End If
End If
End Function
Public Function UTF8_Decode(bUTF8() As Byte) As String
Dim lRet As Long
Dim lLen As Long
Dim lBufferSize As Long
Dim sBuffer As String
Dim bBuffer() As Byte