pull/69/head
FongMi 3 years ago
parent 90ff5c9376
commit 34d7c2bb97
  1. 4
      app/src/main/java/com/github/catvod/utils/Utils.java

@ -49,7 +49,7 @@ public class Utils {
return hasCamera && hasPhone && hasBT;
}
public static boolean isGBK(byte[] bytes) {
public static boolean isGbk(byte[] bytes) {
Charset charset = Charset.forName("GBK");
String str = new String(bytes, charset);
byte[] newBytes = str.getBytes(charset);
@ -57,7 +57,7 @@ public class Utils {
}
public static byte[] toUtf8(byte[] bytes) throws Exception {
return isGBK(bytes) ? new String(bytes, Charset.forName("GBK")).getBytes("UTF-8") : bytes;
return isGbk(bytes) ? new String(bytes, Charset.forName("GBK")).getBytes("UTF-8") : bytes;
}
public static boolean isSub(String ext) {

Loading…
Cancel
Save