'Utf8 转换成 String
Function Utf8toStr(Utf8str as String) as String
   Dim eLen As Integer = Len(Utf8str)
   If eLen = 0 Then Return ""
   Dim wsStr As WString Ptr = CAllocate(eLen * 2 + 2)  '+2 是为了最后空出2个00 为宽字符结尾
   UTFToWChar(UTF_ENCOD_UTF8, StrPtr(Utf8str), wsStr, @eLen)
   Dim ZStr as String
   ZStr = String(eLen * 2 + 2, 0)
   Dim ZStrLen as Integer = WideCharToMultiByte(CP_ACP, 0, wsStr, eLen, StrPtr(ZStr), eLen * 2 + 2, Null, Null)
   If ZStrLen Then Function = Left(ZStr, ZStrLen)
   Deallocate wsStr

End Function