I am requesting results from this API: http://mlrs.research.um.edu.mt/resources/gabra-api/
Everything works fine except when I introduce Maltese characters (which are UTF-8).
If I manually request the data using the following URLs, the return is correct. http://mlrs.research.um.edu.mt/resources/gabra-api/lexemes/search?s=għar
...search?s=ċar (can't post more than two links yet.)
When using the following code, the return is blank.
{"results":[],"query":{"page":1,"page_size":20,"result_count":0,"term":"g?ar","search_lemma":true,"search_wordforms":true,"search_gloss":true,"pending":false,"pos":null,"source":null}}
{"results":[],"query":{"page":1,"page_size":20,"result_count":0,"term":"?ar","search_lemma":true,"search_wordforms":true,"search_gloss":true,"pending":false,"pos":null,"source":null}}
Note ? replacing ħ and ċ characters - that's only because I copied these from the immediate window.
This is the code I am using to make the requests:
Public Function GetWebSource(ByRef Url As String) As String
Dim xml As IXMLHTTPRequest
On Error Resume Next
Set xml = CreateObject("Microsoft.XMLHTTP")
With xml
.Open "GET", Url, False
.send
GetWebSource = .responseText
End With
Set xml = Nothing
End Function
Because VBA IDE does not support these characters, tests will need to be done from a form field.
Any help, much appreciated.
Thanks in advance.
Stephen