0

I am trying to parse some special characters through the api's with Ktor in a KMM project but it seems like Ktor doesn't support it ?.

For eg :- I am trying to parse "Saut� Pans" here "�" is a special character and Ktor throws an exception saying :- io.ktor.utils.io.charsets.MalformedInputException: Input length = 1. Now I have tried passing different headers for example passing different ContentType to UTF-8 or ISO-8859-2 but didn't help.

Whereas parsing the same api response with Gson() works for me.

Any solution or workaround so that for now so that I can parse such kind of special characters in my response ?

WhiteSpidy.
  • 1,107
  • 1
  • 6
  • 28

1 Answers1

0

You could try out

install(ContentEncoding){
    gzip()
}
Róbert Nagy
  • 6,720
  • 26
  • 45