将从XML请求返回的Unicode字符转换为String / Remove

我有一个问题,当检索一个XML请求,我得到的错误

Run-time error '-2147023783(80070459)': No mapping for the Unicode character exists in the target multi-byte code page. 

正在检索的数据在其中包含»字符。 现在我知道这是由于位分配的差异而无法正确映射的事实,但是必须有一种方法将其去除或转换。

我曾尝试使用VBA.Strings.StrConv(),但它仍然给出相同的错误消息

 Function getData(XMLString As String) As String Dim sURL, sResult, sHeaderResult, strPostData, sXmlDocument, resultsformat, sepChar, wholeLine As String Dim subStrCount, i, colNdx, pos, nextPos, saveColNdx, maxRows, maxCols As Integer ReDim subStr(0) As String Dim oHttp, myDom, MyData As Object Dim rowNdx As Long Dim tempVal As Variant Dim myRange As Range 'URL to open sURL = "http://website.com" 'Create Post Data With Worksheets("Control") strPostData = "action=" & .Range("Action").Value & "&baseviewid=" & .Range("BaseViewID").Value & "&key=" & .Range("Key").Value & "&resultsformat=" & .Range("Format").Value & "&userid=" & .Range("UserID").Value End With ' Create an XMLDocument object and add some error trapping On Error Resume Next Set myDom = CreateObject("MSXML2.DOMDocument") If Err.Number <> 0 Then MsgBox "Error 0 has occured while creating a MSXML2.DOMDocument object" End If 'Load XML text myDom.LoadXML XMLString ' Create an XMLHTTP object and add some error trapping On Error Resume Next Set oHttp = CreateObject("WinHttp.WinHttpRequest.5.1") If Err.Number <> 0 Then Set oHttp = CreateObject("MSXML.XMLHTTPRequest") MsgBox "Error 0 has occured while creating a MSXML.XMLHTTPRequest object" End If On Error GoTo 0 If oHttp Is Nothing Then MsgBox "For some reason I wasn't able to make a MSXML2.XMLHTTP object" Exit Function End If 'Join all parameters in one string strPostData = strPostData & "&xmlquery=" & myDom.XML 'SEND REQUEST WITH ALL THE PARAMETERS With oHttp .SetProxy 2, "http://proxy.something.com:8443" .Open "POST", sURL, False .SetTimeouts 120000, 120000, 120000, 120000 .setRequestHeader "Content-Type", "application/x-www-form-urlencoded" .send (strPostData) sHeaderResult = .GetAllResponseHeaders sResult = responseText 'sResult = VBA.Strings.StrConv(.responseText, vbFromUnicode) 'sResult = VBA.Strings.StrConv(.responseText, vbUnicode) End With getData = sResult End Function 

偶尔会出现很多中国风格的人物,而不是错误。 如果我使用的数据没有任何不寻常的字符,则查询按预期工作。

任何解决方法将不胜感激!