I want to read the data of the file which is in the form of txt on the site by WinHTTP via VB6. code works good but result is unreadable: this is my code :
Dim HTTPRequest As WinHttp.WinHttpRequest
Set HTTPRequest = New WinHttp.WinHttpRequest
With HTTPRequest
.Open "GET", "http://mywebsite/msg_app.txt", True
.Send
If .WaitForResponse(3) Then
MsgBox .ResponseText
Else
MsgBox "Timed out after 3 seconds."
End If
End With
Set HTTPRequest = Nothing
result :
U¾U??§U? ?³U??³??U?U? ?§?² ?·?±U? ?³?§U??? :
U?U??©U?U?U? ?§U??©?§U? ?´?§?±?? U¾U?U? U¾U??§U??©U? ?¨?¯U?U? U¾?±?¯?§?®?? U??§U?U??§?? ?¨?±
?§?±?²?´ ?§U??²U??¯U? U??±?§U?U? ?¯?±?¯U??¯ . ?¬U??? ?³U??§?±?´ U??·U??§ ?¯?±?®U??§?³?? ?®U??
?±?§ ?¨U? ?´U??§?±U? U?U??±?§U? ?°U?U? U¾U??§U??© U??±U??§U?U??¯ .
" U?U??· ???§ U¾?§U??§U? U?U???U? "
It is necessary to mention that the text inside the file in the host is in Persian language