Probably the answer is very simple but i can't read data from an httpjob when the results contains special char as ò à è ù ecc.
Sure is a decode problem but i can't find right syntax for solve my problem
thia is my code
web server returns a list of movie titles like this
Anda httpjob reports this error
Error occurred on line: xxx (HttpJob)
Error decoding data as string.
and is related to
i have also tried
with same error.
the problem is clearly linked to the presence of the characters ò à ù è but i can't find a solution
In B4A i use
and have no error and accented characters are showed as soft hyphen �
Thank you
Sure is a decode problem but i can't find right syntax for solve my problem
thia is my code
B4X:
Dim j As HttpJob
j.Initialize("j", Me)
j.Download("https://mysever.est/filmtitlelist.php")
Wait For (j) JobDone(j As HttpJob)
File.WriteString(File.DirDocuments,"localfile.txt",j.GetString)
web server returns a list of movie titles like this
HTML:
001 La vita è bella
002 Roma città aperta
003 La dolce vita
004 Paisà
005 Sciuscià
Anda httpjob reports this error
Error occurred on line: xxx (HttpJob)
Error decoding data as string.
and is related to
B4X:
File.WriteString(File.DirDocuments,"localfile.txt",j.GetString)
B4X:
File.WriteString2(File.DirDocuments,"localfile.txt",j.GetString,"UTF8")
the problem is clearly linked to the presence of the characters ò à ù è but i can't find a solution
In B4A i use
B4X:
Dim out As OutputStream = File.OpenOutput(File.DirInternal, "localfile.txt", False)
File.Copy2(job.GetInputStream, out)
out.Close
Thank you
Last edited: