mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-27 21:10:53 +00:00
Turkish locale toLowerCase I problem fix (causing not loading main window because of icon names conversion, etc.)
This commit is contained in:
+2
-1
@@ -19,6 +19,7 @@ package com.jpexs.browsers.cache;
|
||||
import com.jpexs.helpers.LimitedInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.zip.GZIPInputStream;
|
||||
import java.util.zip.InflaterInputStream;
|
||||
@@ -102,7 +103,7 @@ public abstract class CacheEntry {
|
||||
return null;
|
||||
}
|
||||
for (String k : m.keySet()) {
|
||||
if (k.toLowerCase().equals(header.toLowerCase())) {
|
||||
if (k.toLowerCase(Locale.ENGLISH).equals(header.toLowerCase(Locale.ENGLISH))) {
|
||||
return m.get(k);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-1
@@ -26,6 +26,7 @@ import java.security.AccessController;
|
||||
import java.security.PrivilegedAction;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
@@ -154,7 +155,7 @@ public class ChromeCache implements CacheImplementation {
|
||||
OSId id = OSId.UNIX;
|
||||
String osName = AccessController.doPrivileged(doGetOSName);
|
||||
if (osName != null) {
|
||||
if (osName.toLowerCase().startsWith("mac os x")) {
|
||||
if (osName.toLowerCase(Locale.ENGLISH).startsWith("mac os x")) {
|
||||
id = OSId.OSX;
|
||||
} else if (osName.contains("Windows")) {
|
||||
id = OSId.WINDOWS;
|
||||
|
||||
@@ -20,6 +20,7 @@ import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -93,9 +94,9 @@ public class HttpResponseInfo {
|
||||
for (String h : headers) {
|
||||
if (h.contains(":")) {
|
||||
String[] keyval = h.split(":");
|
||||
String key = keyval[0].trim().toLowerCase();
|
||||
String key = keyval[0].trim().toLowerCase(Locale.ENGLISH);
|
||||
String val = keyval[1].trim();
|
||||
if (header.toLowerCase().equals(key)) {
|
||||
if (header.toLowerCase(Locale.ENGLISH).equals(key)) {
|
||||
return val;
|
||||
}
|
||||
}
|
||||
|
||||
+2
-1
@@ -24,6 +24,7 @@ import java.security.AccessController;
|
||||
import java.security.PrivilegedAction;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
@@ -97,7 +98,7 @@ public class FirefoxCache implements CacheImplementation {
|
||||
OSId id = OSId.UNIX;
|
||||
String osName = AccessController.doPrivileged(doGetOSName);
|
||||
if (osName != null) {
|
||||
if (osName.toLowerCase().startsWith("mac os x")) {
|
||||
if (osName.toLowerCase(Locale.ENGLISH).startsWith("mac os x")) {
|
||||
id = OSId.OSX;
|
||||
} else if (osName.contains("Windows")) {
|
||||
id = OSId.WINDOWS;
|
||||
|
||||
Reference in New Issue
Block a user