Skip to content

Commit 9dafda6

Browse files
committed
🚸 make URLDecoder.decode compatible with Android SDK 25
1 parent 77ee3d8 commit 9dafda6

File tree

1 file changed

+3
-1
lines changed
  • qs-kotlin/src/main/kotlin/io/github/techouse/qskotlin

1 file changed

+3
-1
lines changed

qs-kotlin/src/main/kotlin/io/github/techouse/qskotlin/Utils.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,9 @@ internal object Utils {
457457
}
458458

459459
return try {
460-
strWithoutPlus?.let { URLDecoder.decode(it, charset) }
460+
strWithoutPlus?.let {
461+
URLDecoder.decode(it, charset?.name() ?: StandardCharsets.UTF_8.name())
462+
}
461463
} catch (_: Exception) {
462464
strWithoutPlus
463465
}

0 commit comments

Comments
 (0)