Hi,
I'm attempting to create a routine that leverages code developed by Microsoft and edited by a guy named Patrick O'Beirne.
I am looking to load Chinese data into the routine that uses MSXML2.XMLHTTP to perform a GET on it's way to Microsoft for translation. I apologize if a have confused anyone with the wording. This is honestly the first time I have attempted to perform this, so I'm learning as I go.
This issue is that Spanish or French words are fine, but I believe Chinese symbols are double-byte wide, so the result in the output is question marks...
Here is the code. I traced it all the way into the MSHttpRequest function. It looks like it loads the data into oH, but when it comes back (oH.ResponseText. I might be waaaaay off.
Anyway, my goal is to send Chinese symbols to Microsoft's translation server and return it in English. The rest of the code can be found here: http://www.sysmod.com/MSTranslator.bas. It's a VBA module.
Function MSHttpRequest(sRequest As String) As String
Dim sURL As String, oH As MSXML2.XMLHTTP, sToken As String
sURL = "http://api.microsofttranslator.com/V2/Http.svc/" & sRequest
sToken = GetAccessToken()
Set oH = CreateObject("MSXML2.XMLHTTP")
oH.Open "GET", sURL, False
oH.setRequestHeader "Authorization", "Bearer " & sToken
oH.send
MSHttpRequest = oH.responseText
Set oH = Nothing
End Function
Any help is appreciated.
Thanks,
Steve
Bookmarks