Special characters in webbrowser

timsteeman

Member
Licensed User
Longtime User
B4X:
Sub GetText (URL)
ErrorLabel (errHandler)
   String=""
   Response.New1
   Request.New1(URL)
   
   Response.Value = Request.GetResponse 'This line calls the server and gets the response.
   String = Response.GetString 'Get the Response string.
   Response.Close
   Return String
ErrHandler:         
   Response.Close
   Return String   
End Sub

I'm using the webbrowser to get the response of a site.
When i'm reading the txt context i'm missing the special characters (i.e. ä,ë ö etc).

Does anyone know a workaround?
Thanks!
 

agraham

Expert
Licensed User
Longtime User
I'm not very good on HTTP but it will be an encoding issue. The default charset for Response.New1 is UTF-8. I guess the site uses another encoding. I think you need to use Response.New2(codepage) to set the encoding to whatever the site uses.
Code Page Identifiers (Windows)

Possibly
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…