Shadman
02/07/2024, 11:43 AMKamelImage and Ktor with following url:
"<https://marketmlm.com/wp-content/uploads/2023/08/اعتماد-به-نفس-رابین-شارما-700.png>"
As you see it contains Asscii Char and needs to be converted to UTF-8. In android I used to fix this with URLEncoder but its not available in kmp. Any solution?
io.ktor.http.URLParserException: Fail to parse url: "<https://marketmlm.com/wp-content/uploads/2023/08/اعتماد-به-نفس-رابین-شارما-700.png>"Shadman
02/07/2024, 11:52 AM" from string to %22 . So i create an function and fix the problem:
fun String.encodeUrl(): String {
return this.encodeURLPath().replace("%22","")
}ephemient
02/07/2024, 11:59 AM" isn't legal in URLsephemient
02/07/2024, 12:01 PM