Public Declare Function MultiByteToWideChar Lib "kernel32" (ByVal CodePage As Long, ByVal dwFlags As Long, ByVal lpMultiByteStr As Long, ByVal cchMultiByte As Long, ByVal lpWideCharStr As Long, ByVal cchWideChar As Long) As Long
Public Const CP_UTF8 = 65001

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
   
    lLen = UBound(bUTF8) + 1
   
    If lLen = 0 Then Exit Function
   
    lBufferSize = lLen * 2
   
    sBuffer = String$(lBufferSize, Chr(0))
   
    lRet = MultiByteToWideChar(CP_UTF8, 0, VarPtr(bUTF8(0)), lLen, StrPtr(sBuffer), lBufferSize)
   
    If lRet <> 0 Then
        sBuffer = Left(sBuffer, lRet)
    End If
   
    UTF8_Decode = sBuffer 'Right(sBuffer, Len(sBuffer) - 1)
End Function