Merge pull request #269 from wb9688/charset

Fix for Android versions earlier than KitKat
This commit is contained in:
Tobias Groza 2020-03-01 11:31:26 +01:00 committed by GitHub
commit fcbc96a86c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -20,7 +20,6 @@ import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URL;
import java.net.URLDecoder;
import java.nio.charset.StandardCharsets;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
@ -279,7 +278,7 @@ public class YoutubeParsingHelper {
if (param.split("=")[0].equals("q")) {
String url;
try {
url = URLDecoder.decode(param.split("=")[1], StandardCharsets.UTF_8.name());
url = URLDecoder.decode(param.split("=")[1], "UTF-8");
} catch (UnsupportedEncodingException e) {
return null;
}