From b3e6ff8c78dcfcd75666a492ed26ced5c5343b3c Mon Sep 17 00:00:00 2001 From: ZiaCheemaGit Date: Sat, 26 Jul 2025 16:22:46 +0500 Subject: [PATCH] java_version_problem --- .../java/org/schabi/newpipe/extractor/utils/Utils.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/utils/Utils.java b/extractor/src/main/java/org/schabi/newpipe/extractor/utils/Utils.java index 4146d3de0..a0d06b4e4 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/utils/Utils.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/utils/Utils.java @@ -47,8 +47,14 @@ public final class Utils { * @return The decoded URL. */ public static String decodeUrlUtf8(final String url) { - return URLDecoder.decode(url, StandardCharsets.UTF_8); + try { + return URLDecoder.decode(url, "UTF-8"); // ✅ Compatible with Android + } catch (UnsupportedEncodingException e) { + // Should never happen with UTF-8 + throw new RuntimeException("UTF-8 not supported", e); } +} + /** * Remove all non-digit characters from a string.