Android Question Error when SetHeaders HttpJob with Special Characters 'Ñ'

scsjc

Well-Known Member
Licensed User
Longtime User
I'm use a HttpJob to send a PostMultipart, with a GetRequest.SetHeader("user","baño") and get error:

B4X:
java.lang.IllegalArgumentException: Unexpected char 0xf1 at 4 in user value: baño

B4X:
Dim j As HttpJob
        j.Initialize("", Me)
        Dim fd As MultipartFileData
        fd.Initialize
        fd.KeyName = "file"
        fd.Dir = File.DirInternal
        fd.FileName = "file.jpg"
        fd.ContentType = "image/jpg"
        j.PostMultipart(posturl, null, Array(fd))
        j.GetRequest.SetHeader("user", "baño")
        Wait For (j) JobDone(j As HttpJob)
        If j.Success Then
            Log(j.GetString)
        End If
        j.Release
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…