Index: /trunk/src/org/openstreetmap/josm/Main.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/Main.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/Main.java	(revision 8404)
@@ -28,4 +28,5 @@
 import java.util.Iterator;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 import java.util.Objects;
@@ -542,5 +543,5 @@
     public Main() {
         main = this;
-        isOpenjdk = System.getProperty("java.vm.name").toUpperCase().indexOf("OPENJDK") != -1;
+        isOpenjdk = System.getProperty("java.vm.name").toUpperCase(Locale.ENGLISH).indexOf("OPENJDK") != -1;
 
         if (initListener != null) {
@@ -1188,5 +1189,5 @@
             warn("Your operating system has no name, so I'm guessing its some kind of *nix.");
             platform = new PlatformHookUnixoid();
-        } else if (os.toLowerCase().startsWith("windows")) {
+        } else if (os.toLowerCase(Locale.ENGLISH).startsWith("windows")) {
             platform = new PlatformHookWindows();
         } else if ("Linux".equals(os) || "Solaris".equals(os) ||
@@ -1194,5 +1195,5 @@
                 "FreeBSD".equals(os) || "NetBSD".equals(os) || "OpenBSD".equals(os)) {
             platform = new PlatformHookUnixoid();
-        } else if (os.toLowerCase().startsWith("mac os x")) {
+        } else if (os.toLowerCase(Locale.ENGLISH).startsWith("mac os x")) {
             platform = new PlatformHookOsx();
         } else {
Index: /trunk/src/org/openstreetmap/josm/actions/ExtensionFileFilter.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/ExtensionFileFilter.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/actions/ExtensionFileFilter.java	(revision 8404)
@@ -18,4 +18,5 @@
 import org.openstreetmap.josm.io.FileExporter;
 import org.openstreetmap.josm.io.FileImporter;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -282,9 +283,5 @@
      */
     public boolean acceptName(String filename) {
-        String name = filename.toLowerCase();
-        for (String ext : extensions.split(","))
-            if (name.endsWith("."+ext))
-                return true;
-        return false;
+        return Utils.hasExtension(filename, extensions.split(","));
     }
 
Index: /trunk/src/org/openstreetmap/josm/actions/SessionLoadAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/SessionLoadAction.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/actions/SessionLoadAction.java	(revision 8404)
@@ -53,5 +53,5 @@
         if (fc == null) return;
         File file = fc.getSelectedFile();
-        boolean zip = file.getName().toLowerCase().endsWith(".joz");
+        boolean zip = Utils.hasExtension(file, "joz");
         Main.worker.submit(new Loader(file, zip));
     }
Index: /trunk/src/org/openstreetmap/josm/actions/SessionSaveAsAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/SessionSaveAsAction.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/actions/SessionSaveAsAction.java	(revision 8404)
@@ -41,4 +41,5 @@
 import org.openstreetmap.josm.tools.GBC;
 import org.openstreetmap.josm.tools.MultiMap;
+import org.openstreetmap.josm.tools.Utils;
 import org.openstreetmap.josm.tools.WindowGeometry;
 
@@ -106,5 +107,5 @@
             zip = false;
         } else {
-            if (fn.toLowerCase().endsWith(".joz")) {
+            if (Utils.hasExtension(fn, "joz")) {
                 zip = true;
             } else {
Index: /trunk/src/org/openstreetmap/josm/actions/ShowStatusReportAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/ShowStatusReportAction.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/actions/ShowStatusReportAction.java	(revision 8404)
@@ -15,4 +15,5 @@
 import java.util.List;
 import java.util.ListIterator;
+import java.util.Locale;
 import java.util.Map;
 import java.util.Map.Entry;
@@ -111,5 +112,5 @@
                     String[] param = value.split("=");
                     // Hide some parameters for privacy concerns
-                    if (param[0].toLowerCase().startsWith("-dproxy")) {
+                    if (param[0].toLowerCase(Locale.ENGLISH).startsWith("-dproxy")) {
                         it.set(param[0]+"=xxx");
                     // Shorten some parameters for readability concerns
Index: /trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java	(revision 8404)
@@ -11,4 +11,5 @@
 import java.util.Collection;
 import java.util.HashMap;
+import java.util.Locale;
 import java.util.Map;
 import java.util.regex.Matcher;
@@ -477,5 +478,5 @@
                 this.valuePattern = null;
             } else {
-                this.key = key.toLowerCase();
+                this.key = key.toLowerCase(Locale.ENGLISH);
                 this.value = value;
                 this.keyPattern = null;
@@ -523,6 +524,6 @@
                     return false;
 
-                String v1 = caseSensitive ? mv : mv.toLowerCase();
-                String v2 = caseSensitive ? value : value.toLowerCase();
+                String v1 = caseSensitive ? mv : mv.toLowerCase(Locale.ENGLISH);
+                String v2 = caseSensitive ? value : value.toLowerCase(Locale.ENGLISH);
 
                 v1 = Normalizer.normalize(v1, Normalizer.Form.NFC);
@@ -533,5 +534,8 @@
             return false;
         }
-        @Override public String toString() {return key+"="+value;}
+        @Override
+        public String toString() {
+            return key + "=" + value;
+        }
     }
 
@@ -719,5 +723,5 @@
                 this.searchRegex = null;
             } else {
-                this.search = s.toLowerCase();
+                this.search = s.toLowerCase(Locale.ENGLISH);
                 this.searchRegex = null;
             }
@@ -744,6 +748,6 @@
                 } else {
                     if (!caseSensitive) {
-                        key = key.toLowerCase();
-                        value = value.toLowerCase();
+                        key = key.toLowerCase(Locale.ENGLISH);
+                        value = value.toLowerCase(Locale.ENGLISH);
                     }
 
Index: /trunk/src/org/openstreetmap/josm/corrector/ReverseWayTagCorrector.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/corrector/ReverseWayTagCorrector.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/corrector/ReverseWayTagCorrector.java	(revision 8404)
@@ -8,4 +8,5 @@
 import java.util.HashMap;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 import java.util.regex.Matcher;
@@ -75,5 +76,5 @@
 
             if (m.lookingAt()) {
-                String leftRight = m.group(2).toLowerCase();
+                String leftRight = m.group(2).toLowerCase(Locale.ENGLISH);
 
                 StringBuilder result = new StringBuilder();
Index: /trunk/src/org/openstreetmap/josm/data/CustomConfigurator.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/CustomConfigurator.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/data/CustomConfigurator.java	(revision 8404)
@@ -19,4 +19,5 @@
 import java.util.Iterator;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 import java.util.Map.Entry;
@@ -281,5 +282,4 @@
     }
 
-
     public static void deleteFile(String path, String base) {
         String dir = getDirectoryByAbbr(base);
@@ -320,13 +320,14 @@
     private static boolean busy=false;
 
-
     public static void pluginOperation(String install, String uninstall, String delete)  {
         final List<String> installList = new ArrayList<>();
         final List<String> removeList = new ArrayList<>();
         final List<String> deleteList = new ArrayList<>();
-        Collections.addAll(installList, install.toLowerCase().split(";"));
-        Collections.addAll(removeList, uninstall.toLowerCase().split(";"));
-        Collections.addAll(deleteList, delete.toLowerCase().split(";"));
-        installList.remove("");removeList.remove("");deleteList.remove("");
+        Collections.addAll(installList, install.toLowerCase(Locale.ENGLISH).split(";"));
+        Collections.addAll(removeList, uninstall.toLowerCase(Locale.ENGLISH).split(";"));
+        Collections.addAll(deleteList, delete.toLowerCase(Locale.ENGLISH).split(";"));
+        installList.remove("");
+        removeList.remove("");
+        deleteList.remove("");
 
         if (!installList.isEmpty()) {
@@ -346,46 +347,46 @@
                 if (task.isCanceled()) return;
                 synchronized (CustomConfigurator.class) {
-                try { // proceed only after all other tasks were finished
-                    while (busy) CustomConfigurator.class.wait();
-                } catch (InterruptedException ex) {
-                    Main.warn("InterruptedException while reading local plugin information");
-                }
-
-                SwingUtilities.invokeLater(new Runnable() {
-                    @Override
-                    public void run() {
-                        List<PluginInformation> availablePlugins = task.getAvailablePlugins();
-                        List<PluginInformation> toInstallPlugins = new ArrayList<>();
-                        List<PluginInformation> toRemovePlugins = new ArrayList<>();
-                        List<PluginInformation> toDeletePlugins = new ArrayList<>();
-                        for (PluginInformation pi: availablePlugins) {
-                            String name = pi.name.toLowerCase();
-                            if (installList.contains(name)) toInstallPlugins.add(pi);
-                            if (removeList.contains(name)) toRemovePlugins.add(pi);
-                            if (deleteList.contains(name)) toDeletePlugins.add(pi);
+                    try { // proceed only after all other tasks were finished
+                        while (busy) CustomConfigurator.class.wait();
+                    } catch (InterruptedException ex) {
+                        Main.warn("InterruptedException while reading local plugin information");
+                    }
+
+                    SwingUtilities.invokeLater(new Runnable() {
+                        @Override
+                        public void run() {
+                            List<PluginInformation> availablePlugins = task.getAvailablePlugins();
+                            List<PluginInformation> toInstallPlugins = new ArrayList<>();
+                            List<PluginInformation> toRemovePlugins = new ArrayList<>();
+                            List<PluginInformation> toDeletePlugins = new ArrayList<>();
+                            for (PluginInformation pi: availablePlugins) {
+                                String name = pi.name.toLowerCase(Locale.ENGLISH);
+                                if (installList.contains(name)) toInstallPlugins.add(pi);
+                                if (removeList.contains(name)) toRemovePlugins.add(pi);
+                                if (deleteList.contains(name)) toDeletePlugins.add(pi);
+                            }
+                            if (!installList.isEmpty()) {
+                                PluginDownloadTask pluginDownloadTask =
+                                        new PluginDownloadTask(Main.parent, toInstallPlugins, tr("Installing plugins"));
+                                Main.worker.submit(pluginDownloadTask);
+                            }
+                            Collection<String> pls = new ArrayList<>(Main.pref.getCollection("plugins"));
+                            for (PluginInformation pi: toInstallPlugins) {
+                                if (!pls.contains(pi.name)) {
+                                    pls.add(pi.name);
+                                }
+                            }
+                            for (PluginInformation pi: toRemovePlugins) {
+                                pls.remove(pi.name);
+                            }
+                            for (PluginInformation pi: toDeletePlugins) {
+                                pls.remove(pi.name);
+                                new File(Main.pref.getPluginsDirectory(), pi.name+".jar").deleteOnExit();
+                            }
+                            Main.pref.putCollection("plugins",pls);
                         }
-                        if (!installList.isEmpty()) {
-                            PluginDownloadTask pluginDownloadTask = new PluginDownloadTask(Main.parent, toInstallPlugins, tr ("Installing plugins"));
-                            Main.worker.submit(pluginDownloadTask);
-                        }
-                        Collection<String> pls = new ArrayList<>(Main.pref.getCollection("plugins"));
-                        for (PluginInformation pi: toInstallPlugins) {
-                            if (!pls.contains(pi.name)) {
-                                pls.add(pi.name);
-                            }
-                        }
-                        for (PluginInformation pi: toRemovePlugins) {
-                            pls.remove(pi.name);
-                        }
-                        for (PluginInformation pi: toDeletePlugins) {
-                            pls.remove(pi.name);
-                            new File(Main.pref.getPluginsDirectory(), pi.name+".jar").deleteOnExit();
-                        }
-                        Main.pref.putCollection("plugins",pls);
-                    }
-                });
-            }
-            }
-
+                    });
+                }
+            }
         };
         Main.worker.submit(task);
Index: /trunk/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java	(revision 8404)
@@ -10,4 +10,5 @@
 import java.util.Collections;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 import java.util.Objects;
@@ -545,5 +546,5 @@
         int i = countryCode.compareTo(in.countryCode);
         if (i == 0) {
-            i = name.toLowerCase().compareTo(in.name.toLowerCase());
+            i = name.toLowerCase(Locale.ENGLISH).compareTo(in.name.toLowerCase(Locale.ENGLISH));
         }
         if (i == 0) {
@@ -690,5 +691,5 @@
             try {
                 serverProjections = new ArrayList<>();
-                Matcher m = Pattern.compile(".*\\{PROJ\\(([^)}]+)\\)\\}.*").matcher(url.toUpperCase());
+                Matcher m = Pattern.compile(".*\\{PROJ\\(([^)}]+)\\)\\}.*").matcher(url.toUpperCase(Locale.ENGLISH));
                 if(m.matches()) {
                     for(String p : m.group(1).split(","))
Index: /trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java	(revision 8404)
@@ -15,4 +15,5 @@
 import java.util.LinkedList;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 import java.util.Set;
@@ -1342,5 +1343,5 @@
     public Object getTemplateValue(String name, boolean special) {
         if (special) {
-            String lc = name.toLowerCase();
+            String lc = name.toLowerCase(Locale.ENGLISH);
             if (SPECIAL_VALUE_ID.equals(lc))
                 return getId();
Index: /trunk/src/org/openstreetmap/josm/data/preferences/ColorProperty.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/preferences/ColorProperty.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/data/preferences/ColorProperty.java	(revision 8404)
@@ -3,4 +3,5 @@
 
 import java.awt.Color;
+import java.util.Locale;
 
 import org.openstreetmap.josm.Main;
@@ -14,5 +15,5 @@
 
     private final String name;
-    
+
     /**
      * Constructs a new {@code ColorProperty}.
@@ -24,5 +25,5 @@
         this.name = colName;
     }
-    
+
     @Override
     public Color get() {
@@ -34,5 +35,5 @@
         return Main.pref.putColor(getColorKey(name), value);
     }
-    
+
     /**
      * Replies the color key used in JOSM preferences for this property.
@@ -41,5 +42,5 @@
      */
     public static String getColorKey(String colName) {
-        return colName == null ? null : colName.toLowerCase().replaceAll("[^a-z0-9]+",".");
+        return colName == null ? null : colName.toLowerCase(Locale.ENGLISH).replaceAll("[^a-z0-9]+",".");
     }
 
Index: /trunk/src/org/openstreetmap/josm/data/projection/Projections.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/projection/Projections.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/data/projection/Projections.java	(revision 8404)
@@ -11,4 +11,5 @@
 import java.util.HashMap;
 import java.util.HashSet;
+import java.util.Locale;
 import java.util.Map;
 import java.util.Set;
@@ -133,5 +134,5 @@
      */
     public static String getInit(String id) {
-        Pair<String, String> r = inits.get(id.toUpperCase());
+        Pair<String, String> r = inits.get(id.toUpperCase(Locale.ENGLISH));
         if (r == null) return null;
         return r.b;
Index: /trunk/src/org/openstreetmap/josm/data/validation/routines/DomainValidator.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/routines/DomainValidator.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/data/validation/routines/DomainValidator.java	(revision 8404)
@@ -18,4 +18,5 @@
 
 import java.util.Arrays;
+import java.util.Locale;
 
 /**
@@ -170,5 +171,5 @@
      */
     public boolean isValidInfrastructureTld(String iTld) {
-        return Arrays.binarySearch(INFRASTRUCTURE_TLDS, chompLeadingDot(iTld.toLowerCase())) >= 0;
+        return Arrays.binarySearch(INFRASTRUCTURE_TLDS, chompLeadingDot(iTld.toLowerCase(Locale.ENGLISH))) >= 0;
     }
 
@@ -181,5 +182,5 @@
      */
     public boolean isValidGenericTld(String gTld) {
-        return Arrays.binarySearch(GENERIC_TLDS, chompLeadingDot(gTld.toLowerCase())) >= 0;
+        return Arrays.binarySearch(GENERIC_TLDS, chompLeadingDot(gTld.toLowerCase(Locale.ENGLISH))) >= 0;
     }
 
@@ -192,5 +193,5 @@
      */
     public boolean isValidIdnTld(String iTld) {
-        return Arrays.binarySearch(IDN_TLDS, chompLeadingDot(iTld.toUpperCase())) >= 0;
+        return Arrays.binarySearch(IDN_TLDS, chompLeadingDot(iTld.toUpperCase(Locale.ENGLISH))) >= 0;
     }
 
@@ -203,5 +204,5 @@
      */
     public boolean isValidCountryCodeTld(String ccTld) {
-        return Arrays.binarySearch(COUNTRY_CODE_TLDS, chompLeadingDot(ccTld.toLowerCase())) >= 0;
+        return Arrays.binarySearch(COUNTRY_CODE_TLDS, chompLeadingDot(ccTld.toLowerCase(Locale.ENGLISH))) >= 0;
     }
 
@@ -214,5 +215,5 @@
      */
     public boolean isValidLocalTld(String iTld) {
-        return Arrays.binarySearch(LOCAL_TLDS, chompLeadingDot(iTld.toLowerCase())) >= 0;
+        return Arrays.binarySearch(LOCAL_TLDS, chompLeadingDot(iTld.toLowerCase(Locale.ENGLISH))) >= 0;
     }
 
Index: /trunk/src/org/openstreetmap/josm/data/validation/tests/Addresses.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/tests/Addresses.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/data/validation/tests/Addresses.java	(revision 8404)
@@ -12,4 +12,5 @@
 import java.util.Iterator;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 import java.util.Map.Entry;
@@ -151,5 +152,5 @@
                     String number = p.get(ADDR_HOUSE_NUMBER);
                     if (number != null) {
-                        number = number.trim().toUpperCase();
+                        number = number.trim().toUpperCase(Locale.ENGLISH);
                         List<OsmPrimitive> list = map.get(number);
                         if (list == null) {
Index: /trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java	(revision 8404)
@@ -21,4 +21,5 @@
 import java.util.LinkedList;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 import java.util.Set;
@@ -253,5 +254,5 @@
                 sb.append("throw")
                 .append(s.name().charAt(0))
-                .append(s.name().substring(1).toLowerCase());
+                .append(s.name().substring(1).toLowerCase(Locale.ENGLISH));
             }
             return sb.toString();
@@ -276,5 +277,5 @@
                     if (ai.key.startsWith("throw")) {
                         try {
-                            final Severity severity = Severity.valueOf(ai.key.substring("throw".length()).toUpperCase());
+                            final Severity severity = Severity.valueOf(ai.key.substring("throw".length()).toUpperCase(Locale.ENGLISH));
                             check.errors.put(ai, severity);
                         } catch (IllegalArgumentException e) {
Index: /trunk/src/org/openstreetmap/josm/data/validation/tests/SimilarNamedWays.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/tests/SimilarNamedWays.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/data/validation/tests/SimilarNamedWays.java	(revision 8404)
@@ -11,4 +11,5 @@
 import java.util.HashMap;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 import java.util.regex.Matcher;
@@ -250,5 +251,5 @@
 
         public SynonymRule(String replacement, String[] words) {
-            this.replacement = replacement.toLowerCase();
+            this.replacement = replacement.toLowerCase(Locale.ENGLISH);
             this.words = words;
 
Index: /trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java	(revision 8404)
@@ -18,4 +18,5 @@
 import java.util.HashMap;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 import java.util.Map.Entry;
@@ -424,7 +425,7 @@
             }
             if (checkFixmes && key != null && value != null && value.length() > 0) {
-                if ((value.toLowerCase().contains("fixme")
+                if ((value.toLowerCase(Locale.ENGLISH).contains("fixme")
                         || value.contains("check and delete")
-                        || key.contains("todo") || key.toLowerCase().contains("fixme"))
+                        || key.contains("todo") || key.toLowerCase(Locale.ENGLISH).contains("fixme"))
                         && !withErrors.contains(p, "FIXME")) {
                     errors.add(new TestError(this, Severity.OTHER,
Index: /trunk/src/org/openstreetmap/josm/gui/ImageryMenu.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/ImageryMenu.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/gui/ImageryMenu.java	(revision 8404)
@@ -15,4 +15,5 @@
 import java.util.Iterator;
 import java.util.List;
+import java.util.Locale;
 
 import javax.swing.Action;
@@ -54,5 +55,5 @@
         @Override
         public int compare(ImageryInfo ii1, ImageryInfo ii2) {
-            return ii1.getName().toLowerCase().compareTo(ii2.getName().toLowerCase());
+            return ii1.getName().toLowerCase(Locale.ENGLISH).compareTo(ii2.getName().toLowerCase(Locale.ENGLISH));
         }
     };
Index: /trunk/src/org/openstreetmap/josm/gui/MainApplication.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 8404)
@@ -34,4 +34,5 @@
 import java.util.LinkedList;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 import java.util.Set;
@@ -206,5 +207,5 @@
 
         private Option(boolean requiresArgument) {
-            this.name = name().toLowerCase().replace("_", "-");
+            this.name = name().toLowerCase(Locale.ENGLISH).replace("_", "-");
             this.requiresArg = requiresArgument;
         }
@@ -229,5 +230,5 @@
             Map<Option, Collection<String>> res = new EnumMap<>(Option.class);
             for (Map.Entry<String, Collection<String>> e : opts.entrySet()) {
-                Option o = Option.valueOf(e.getKey().toUpperCase().replace("-", "_"));
+                Option o = Option.valueOf(e.getKey().toUpperCase(Locale.ENGLISH).replace("-", "_"));
                 if (o != null) {
                     res.put(o, e.getValue());
@@ -509,8 +510,8 @@
             for (String s : args.get(Option.OFFLINE).iterator().next().split(",")) {
                 try {
-                    Main.setOffline(OnlineResource.valueOf(s.toUpperCase()));
+                    Main.setOffline(OnlineResource.valueOf(s.toUpperCase(Locale.ENGLISH)));
                 } catch (IllegalArgumentException e) {
                     Main.error(tr("''{0}'' is not a valid value for argument ''{1}''. Possible values are {2}, possibly delimited by commas.",
-                            s.toUpperCase(), Option.OFFLINE.getName(), Arrays.toString(OnlineResource.values())));
+                            s.toUpperCase(Locale.ENGLISH), Option.OFFLINE.getName(), Arrays.toString(OnlineResource.values())));
                     System.exit(1);
                     return;
Index: /trunk/src/org/openstreetmap/josm/gui/MainMenu.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/MainMenu.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/gui/MainMenu.java	(revision 8404)
@@ -16,4 +16,5 @@
 import java.util.HashMap;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 
@@ -857,13 +858,14 @@
      */
     private List<JMenuItem> findMenuItems(String textToFind) {
-        textToFind = textToFind.toLowerCase();
+        // Explicitely use default locale in this case, because we're looking for translated strings
+        textToFind = textToFind.toLowerCase(Locale.getDefault());
         List<JMenuItem> result = new ArrayList<>();
 
         // Iterate over main menus
         for (MenuElement menuElement : getSubElements()) {
-            if( !(menuElement instanceof JMenu)) continue;
+            if (!(menuElement instanceof JMenu)) continue;
 
             JMenu mainMenuItem = (JMenu) menuElement;
-            if(mainMenuItem.getAction()!=null && mainMenuItem.getText().toLowerCase().contains(textToFind)) {
+            if (mainMenuItem.getAction() != null && mainMenuItem.getText().toLowerCase(Locale.getDefault()).contains(textToFind)) {
                 result.add(mainMenuItem);
             }
@@ -887,5 +889,6 @@
             if (menuItem == null) continue;
 
-            if (menuItem.getAction()!=null && menuItem.getText().toLowerCase().contains(textToFind)) {
+            // Explicitely use default locale in this case, because we're looking for translated strings
+            if (menuItem.getAction() != null && menuItem.getText().toLowerCase(Locale.getDefault()).contains(textToFind)) {
                 result.add(menuItem);
             }
@@ -1007,5 +1010,6 @@
         //TODO: perform some delay (maybe 200 ms) before actual searching.
         void doSearch(String searchTerm) {
-            searchTerm = searchTerm.trim().toLowerCase();
+            // Explicitely use default locale in this case, because we're looking for translated strings
+            searchTerm = searchTerm.trim().toLowerCase(Locale.getDefault());
 
             if (searchTerm.equals(currentSearchText)) {
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/LatLonDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/LatLonDialog.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/LatLonDialog.java	(revision 8404)
@@ -374,5 +374,5 @@
                 } else if (m.group(7) != null) {
                     sb.append('x');     // cardinal direction
-                    String c = m.group(7).toUpperCase();
+                    String c = m.group(7).toUpperCase(Locale.ENGLISH);
                     if ("N".equals(c) || "S".equals(c) || "E".equals(c) || "W".equals(c)) {
                         list.add(c);
Index: /trunk/src/org/openstreetmap/josm/gui/download/BookmarkList.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/download/BookmarkList.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/gui/download/BookmarkList.java	(revision 8404)
@@ -11,4 +11,5 @@
 import java.util.LinkedList;
 import java.util.List;
+import java.util.Locale;
 
 import javax.swing.DefaultListModel;
@@ -73,5 +74,5 @@
         @Override
         public int compareTo(Bookmark b) {
-            return name.toLowerCase().compareTo(b.name.toLowerCase());
+            return name.toLowerCase(Locale.ENGLISH).compareTo(b.name.toLowerCase(Locale.ENGLISH));
         }
 
Index: /trunk/src/org/openstreetmap/josm/gui/io/UploadStrategy.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/io/UploadStrategy.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/gui/io/UploadStrategy.java	(revision 8404)
@@ -3,4 +3,6 @@
 
 import static org.openstreetmap.josm.tools.I18n.tr;
+
+import java.util.Locale;
 
 import org.openstreetmap.josm.Main;
@@ -28,5 +30,5 @@
     public static UploadStrategy fromPreference(String preferenceValue) {
         if (preferenceValue == null) return null;
-        preferenceValue = preferenceValue.trim().toLowerCase();
+        preferenceValue = preferenceValue.trim().toLowerCase(Locale.ENGLISH);
         for (UploadStrategy strategy: values()) {
             if (strategy.getPreferenceValue().equals(preferenceValue))
@@ -76,5 +78,5 @@
                 v = "";
             }
-            v = v.trim().toLowerCase();
+            v = v.trim().toLowerCase(Locale.ENGLISH);
             if ("true".equals(v))
                 return SINGLE_REQUEST_STRATEGY;
Index: /trunk/src/org/openstreetmap/josm/gui/layer/WMSLayer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/WMSLayer.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/WMSLayer.java	(revision 8404)
@@ -25,4 +25,5 @@
 import java.util.Iterator;
 import java.util.List;
+import java.util.Locale;
 import java.util.Set;
 import java.util.concurrent.locks.Condition;
@@ -1064,5 +1065,5 @@
     public boolean isProjectionSupported(Projection proj) {
         List<String> serverProjections = info.getServerProjections();
-        return serverProjections.contains(proj.toCode().toUpperCase())
+        return serverProjections.contains(proj.toCode().toUpperCase(Locale.ENGLISH))
                 || ("EPSG:3857".equals(proj.toCode()) && (serverProjections.contains("EPSG:4326") || serverProjections.contains("CRS:84")))
                 || ("EPSG:4326".equals(proj.toCode()) && serverProjections.contains("CRS:84"));
Index: /trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java	(revision 8404)
@@ -79,4 +79,5 @@
 import org.openstreetmap.josm.tools.GBC;
 import org.openstreetmap.josm.tools.ImageProvider;
+import org.openstreetmap.josm.tools.Utils;
 import org.openstreetmap.josm.tools.date.DateUtils;
 import org.openstreetmap.josm.tools.date.PrimaryDateParser;
@@ -144,7 +145,5 @@
             FileFilter filter = new FileFilter(){
                 @Override public boolean accept(File f) {
-                    return f.isDirectory()
-                            || f .getName().toLowerCase().endsWith(".gpx")
-                            || f.getName().toLowerCase().endsWith(".gpx.gz");
+                    return f.isDirectory() || Utils.hasExtension(f, "gpx", "gpx.gz");
                 }
                 @Override public String getDescription() {
@@ -214,5 +213,5 @@
 
         private InputStream createInputStream(File sel) throws IOException, FileNotFoundException {
-            if (sel.getName().toLowerCase().endsWith(".gpx.gz")) {
+            if (Utils.hasExtension(sel, "gpx.gz")) {
                 return new GZIPInputStream(new FileInputStream(sel));
             } else {
Index: /trunk/src/org/openstreetmap/josm/gui/layer/geoimage/JpegFileFilter.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/geoimage/JpegFileFilter.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/geoimage/JpegFileFilter.java	(revision 8404)
@@ -5,4 +5,6 @@
 
 import java.io.File;
+
+import org.openstreetmap.josm.tools.Utils;
 
 class JpegFileFilter extends javax.swing.filechooser.FileFilter implements java.io.FileFilter {
@@ -18,6 +20,5 @@
             return true;
         } else {
-            String name = f.getName().toLowerCase();
-            return name.endsWith(".jpg") || name.endsWith(".jpeg");
+            return Utils.hasExtension(f, "jpg", "jpeg");
         }
     }
Index: /trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportAudioAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportAudioAction.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportAudioAction.java	(revision 8404)
@@ -71,5 +71,5 @@
             @Override
             public boolean accept(File f) {
-                return f.isDirectory() || f.getName().toLowerCase().endsWith(".wav");
+                return f.isDirectory() || Utils.hasExtension(f, "wav");
             }
 
Index: /trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportImagesAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportImagesAction.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportImagesAction.java	(revision 8404)
@@ -22,4 +22,5 @@
 import org.openstreetmap.josm.io.JpgImporter;
 import org.openstreetmap.josm.tools.ImageProvider;
+import org.openstreetmap.josm.tools.Utils;
 
 public class ImportImagesAction extends AbstractAction {
@@ -41,5 +42,5 @@
             if (f.isDirectory()) {
                 addRecursiveFiles(files, f.listFiles());
-            } else if (f.getName().toLowerCase().endsWith(".jpg")) {
+            } else if (Utils.hasExtension(f, "jpg")) {
                 files.add(f);
             }
Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/Keyword.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/Keyword.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/Keyword.java	(revision 8404)
@@ -2,4 +2,5 @@
 package org.openstreetmap.josm.gui.mappaint;
 
+import java.util.Locale;
 import java.util.Objects;
 
@@ -8,5 +9,5 @@
 
     public Keyword(String val) {
-        this.val = val.toLowerCase();
+        this.val = val.toLowerCase(Locale.ENGLISH);
     }
 
Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java	(revision 8404)
@@ -287,7 +287,7 @@
             if (zipEntryPath != null)
                 return new XmlStyleSource(entry);
-            if (entry.url.toLowerCase().endsWith(".mapcss"))
+            if (Utils.hasExtension(entry.url, "mapcss"))
                 return new MapCSSStyleSource(entry);
-            if (entry.url.toLowerCase().endsWith(".xml"))
+            if (Utils.hasExtension(entry.url, "xml"))
                 return new XmlStyleSource(entry);
             else {
Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParser.jj
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParser.jj	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParser.jj	(revision 8404)
@@ -14,4 +14,5 @@
 import java.util.Collections;
 import java.util.List;
+import java.util.Locale;
 
 import org.openstreetmap.josm.Main;
@@ -388,5 +389,5 @@
     ( <PP_NOT> { invert = true; } pp_w() )?
     (
-            t=<IDENT> { mediatype = t.image.toLowerCase(); } pp_w()
+            t=<IDENT> { mediatype = t.image.toLowerCase(Locale.ENGLISH); } pp_w()
             ( <PP_AND> pp_w() e=pp_media_expression() { pass = pass && e; } pp_w() )*
         |
Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSource.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSource.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSource.java	(revision 8404)
@@ -19,4 +19,5 @@
 import java.util.Iterator;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 import java.util.Map.Entry;
@@ -102,5 +103,5 @@
             try {
                 SUPPORTED_KEYS.add((String) f.get(null));
-                if (!f.getName().toLowerCase().replace("_", "-").equals(f.get(null))) {
+                if (!f.getName().toLowerCase(Locale.ENGLISH).replace("_", "-").equals(f.get(null))) {
                     throw new RuntimeException(f.getName());
                 }
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java	(revision 8404)
@@ -15,4 +15,5 @@
 import java.util.LinkedHashMap;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 import java.util.Map.Entry;
@@ -49,4 +50,5 @@
 import org.openstreetmap.josm.gui.widgets.JosmTextField;
 import org.openstreetmap.josm.tools.GBC;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -191,5 +193,5 @@
             @Override
             public boolean accept(File f) {
-                return f.isDirectory() || f.getName().toLowerCase().endsWith(".xml");
+                return f.isDirectory() || Utils.hasExtension(f, "xml");
             }
             @Override
@@ -435,8 +437,8 @@
 
             // Make 'wmsplugin cache' search for e.g. 'cache.wmsplugin'
-            final String prefKeyLower = prefKey.toLowerCase();
-            final String prefValueLower = prefValue.toLowerCase();
+            final String prefKeyLower = prefKey.toLowerCase(Locale.ENGLISH);
+            final String prefValueLower = prefValue.toLowerCase(Locale.ENGLISH);
             for (String bit : input) {
-                bit = bit.toLowerCase();
+                bit = bit.toLowerCase(Locale.ENGLISH);
                 if (!prefKeyLower.contains(bit) && !prefValueLower.contains(bit)) {
                     canHas = false;
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/advanced/ExportProfileAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/advanced/ExportProfileAction.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/advanced/ExportProfileAction.java	(revision 8404)
@@ -8,4 +8,5 @@
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 
@@ -21,4 +22,5 @@
 import org.openstreetmap.josm.data.Preferences.Setting;
 import org.openstreetmap.josm.gui.widgets.AbstractFileChooser;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -65,5 +67,5 @@
             @Override
             public boolean accept(File f) {
-                return f.isDirectory() || f.getName().toLowerCase().endsWith(".xml") && f.getName().toLowerCase().startsWith(schemaKey);
+                return f.isDirectory() || Utils.hasExtension(f, "xml") && f.getName().toLowerCase(Locale.ENGLISH).startsWith(schemaKey);
             }
             @Override
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreferencesModel.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreferencesModel.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreferencesModel.java	(revision 8404)
@@ -11,4 +11,5 @@
 import java.util.LinkedList;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 import java.util.Map.Entry;
@@ -155,6 +156,6 @@
                     @Override
                     public int compare(PluginInformation o1, PluginInformation o2) {
-                        String n1 = o1.getName() == null ? "" : o1.getName().toLowerCase();
-                        String n2 = o2.getName() == null ? "" : o2.getName().toLowerCase();
+                        String n1 = o1.getName() == null ? "" : o1.getName().toLowerCase(Locale.ENGLISH);
+                        String n2 = o2.getName() == null ? "" : o2.getName().toLowerCase(Locale.ENGLISH);
                         return n1.compareTo(n2);
                     }
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginUpdatePolicyPanel.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginUpdatePolicyPanel.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginUpdatePolicyPanel.java	(revision 8404)
@@ -9,4 +9,5 @@
 import java.awt.Insets;
 import java.util.EnumMap;
+import java.util.Locale;
 import java.util.Map;
 
@@ -46,5 +47,5 @@
         static Policy fromPreferenceValue(String preferenceValue) {
             if (preferenceValue == null) return null;
-            preferenceValue = preferenceValue.trim().toLowerCase();
+            preferenceValue = preferenceValue.trim().toLowerCase(Locale.ENGLISH);
             for (Policy p: Policy.values()) {
                 if (p.getPreferencesValue().equals(preferenceValue))
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/projection/CodeProjectionChoice.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/projection/CodeProjectionChoice.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/projection/CodeProjectionChoice.java	(revision 8404)
@@ -13,4 +13,5 @@
 import java.util.Comparator;
 import java.util.List;
+import java.util.Locale;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
@@ -164,7 +165,7 @@
         private void updateFilter() {
             filteredData.clear();
-            String filterTxt = filter.getText().trim().toLowerCase();
+            String filterTxt = filter.getText().trim().toLowerCase(Locale.ENGLISH);
             for (String code : data) {
-                if (code.toLowerCase().contains(filterTxt)) {
+                if (code.toLowerCase(Locale.ENGLISH).contains(filterTxt)) {
                     filteredData.add(code);
                 }
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/server/ProxyPreferencesPanel.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/server/ProxyPreferencesPanel.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/server/ProxyPreferencesPanel.java	(revision 8404)
@@ -16,4 +16,5 @@
 import java.net.ProxySelector;
 import java.util.EnumMap;
+import java.util.Locale;
 import java.util.Map;
 
@@ -74,5 +75,5 @@
         public static ProxyPolicy fromName(String policyName) {
             if (policyName == null) return null;
-            policyName = policyName.trim().toLowerCase();
+            policyName = policyName.trim().toLowerCase(Locale.ENGLISH);
             for(ProxyPolicy pp: values()) {
                 if (pp.getName().equals(policyName))
Index: /trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetSelector.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetSelector.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetSelector.java	(revision 8404)
@@ -22,4 +22,5 @@
 import java.util.Iterator;
 import java.util.List;
+import java.util.Locale;
 import java.util.Objects;
 import java.util.Set;
@@ -135,8 +136,8 @@
             TaggingPreset group = preset.group;
             while (group != null) {
-                Collections.addAll(groups, group.getLocaleName().toLowerCase().split("\\s"));
+                Collections.addAll(groups, group.getLocaleName().toLowerCase(Locale.ENGLISH).split("\\s"));
                 group = group.group;
             }
-            Collections.addAll(names, preset.getLocaleName().toLowerCase().split("\\s"));
+            Collections.addAll(names, preset.getLocaleName().toLowerCase(Locale.ENGLISH).split("\\s"));
             for (TaggingPresetItem item: preset.data) {
                 if (item instanceof KeyedItem) {
@@ -165,5 +166,5 @@
                 boolean foundFirst = false;
                 for (String value: values) {
-                    int index = value.toLowerCase().indexOf(word);
+                    int index = value.toLowerCase(Locale.ENGLISH).indexOf(word);
                     if (index == 0) {
                         foundFirst = true;
@@ -329,5 +330,5 @@
     private synchronized void filterPresets() {
         //TODO Save favorites to file
-        String text = edSearchText.getText().toLowerCase();
+        String text = edSearchText.getText().toLowerCase(Locale.ENGLISH);
         boolean onlyApplicable = ckOnlyApplicable != null && ckOnlyApplicable.isSelected();
         boolean inTags = ckSearchInTags != null && ckSearchInTags.isSelected();
Index: /trunk/src/org/openstreetmap/josm/gui/util/RotationAngle.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/util/RotationAngle.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/gui/util/RotationAngle.java	(revision 8404)
@@ -1,4 +1,6 @@
 // License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.gui.util;
+
+import java.util.Locale;
 
 import org.openstreetmap.josm.data.osm.Node;
@@ -55,5 +57,5 @@
      */
     public static double parseCardinalRotation(final String cardinal) {
-        switch (cardinal.toLowerCase()) {
+        switch (cardinal.toLowerCase(Locale.ENGLISH)) {
             case "n":
             case "north":
Index: /trunk/src/org/openstreetmap/josm/gui/widgets/MultiSplitLayout.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/widgets/MultiSplitLayout.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/gui/widgets/MultiSplitLayout.java	(revision 8404)
@@ -38,4 +38,5 @@
 import java.util.List;
 import java.util.ListIterator;
+import java.util.Locale;
 import java.util.Map;
 
@@ -1188,5 +1189,5 @@
                     throwParseException(st, "invalid node type");
                 }
-                String nodeType = st.sval.toUpperCase();
+                String nodeType = st.sval.toUpperCase(Locale.ENGLISH);
                 if ("LEAF".equals(nodeType)) {
                     parseLeaf(st, parent);
Index: /trunk/src/org/openstreetmap/josm/io/JpgImporter.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/JpgImporter.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/io/JpgImporter.java	(revision 8404)
@@ -16,4 +16,5 @@
 import org.openstreetmap.josm.gui.layer.geoimage.GeoImageLayer;
 import org.openstreetmap.josm.gui.progress.ProgressMonitor;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -105,5 +106,5 @@
                     }
                 } else {
-                    if (f.getName().toLowerCase().endsWith(".jpg")) {
+                    if (Utils.hasExtension(f, "jpg")) {
                         files.add(f);
                     }
Index: /trunk/src/org/openstreetmap/josm/io/imagery/WMSGrabber.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/imagery/WMSGrabber.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/io/imagery/WMSGrabber.java	(revision 8404)
@@ -209,7 +209,7 @@
         // [1] https://www.epsg-registry.org/report.htm?type=selection&entity=urn:ogc:def:crs:EPSG::4326&reportDetail=short&style=urn:uuid:report-style:default-with-code&style_name=OGP%20Default%20With%20Code&title=EPSG:4326
         boolean switchLatLon = false;
-        if (baseURL.toLowerCase().contains("crs=epsg:4326")) {
+        if (baseURL.toLowerCase(Locale.ENGLISH).contains("crs=epsg:4326")) {
             switchLatLon = true;
-        } else if (baseURL.toLowerCase().contains("crs=") && "EPSG:4326".equals(myProj)) {
+        } else if (baseURL.toLowerCase(Locale.ENGLISH).contains("crs=") && "EPSG:4326".equals(myProj)) {
             switchLatLon = true;
         }
Index: /trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java	(revision 8404)
@@ -15,4 +15,5 @@
 import java.util.HashSet;
 import java.util.List;
+import java.util.Locale;
 import java.util.Set;
 import java.util.regex.Pattern;
@@ -263,5 +264,5 @@
             String crs = (String) getContent(child);
             if (!crs.isEmpty()) {
-                String upperCase = crs.trim().toUpperCase();
+                String upperCase = crs.trim().toUpperCase(Locale.ENGLISH);
                 crsList.add(upperCase);
             }
Index: /trunk/src/org/openstreetmap/josm/io/remotecontrol/DNSName.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/remotecontrol/DNSName.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/io/remotecontrol/DNSName.java	(revision 8404)
@@ -161,5 +161,5 @@
     @Override
     public int hashCode() {
-        return name.toUpperCase().hashCode();
+        return name.toUpperCase(Locale.ENGLISH).hashCode();
     }
 
Index: /trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpsServer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpsServer.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpsServer.java	(revision 8404)
@@ -28,4 +28,5 @@
 import java.util.Date;
 import java.util.Enumeration;
+import java.util.Locale;
 import java.util.Vector;
 
@@ -117,5 +118,5 @@
     private static GeneralName createGeneralName(String t, String v) throws IOException {
         GeneralNameInterface gn;
-        switch (t.toLowerCase()) {
+        switch (t.toLowerCase(Locale.ENGLISH)) {
             case "uri": gn = new URIName(v); break;
             case "dns": gn = new DNSName(v); break;
Index: /trunk/src/org/openstreetmap/josm/io/session/SessionImporter.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/session/SessionImporter.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/io/session/SessionImporter.java	(revision 8404)
@@ -13,4 +13,5 @@
 import org.openstreetmap.josm.io.FileImporter;
 import org.openstreetmap.josm.io.IllegalDataException;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -35,5 +36,5 @@
     @Override
     public void importData(File file, ProgressMonitor progressMonitor) throws IOException, IllegalDataException {
-        boolean zip = file.getName().toLowerCase().endsWith(".joz");
+        boolean zip = Utils.hasExtension(file, "joz");
         Main.worker.submit(new Loader(file, zip));
     }
Index: /trunk/src/org/openstreetmap/josm/io/session/SessionReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/session/SessionReader.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/io/session/SessionReader.java	(revision 8404)
@@ -582,5 +582,5 @@
         while (entries.hasMoreElements()) {
             ZipEntry entry = entries.nextElement();
-            if (entry.getName().toLowerCase().endsWith(".jos")) {
+            if (Utils.hasExtension(entry.getName(), "jos")) {
                 josEntry = entry;
                 break;
Index: /trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java	(revision 8404)
@@ -28,4 +28,5 @@
 import java.util.LinkedList;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 import java.util.Map.Entry;
@@ -380,5 +381,5 @@
         // check whether automatic update at startup was disabled
         //
-        String policy = Main.pref.get(togglePreferenceKey, "ask").trim().toLowerCase();
+        String policy = Main.pref.get(togglePreferenceKey, "ask").trim().toLowerCase(Locale.ENGLISH);
         switch(policy) {
         case "never":
@@ -1408,5 +1409,5 @@
         public void initDontShowAgain(String preferencesKey) {
             String policy = Main.pref.get(preferencesKey, "ask");
-            policy = policy.trim().toLowerCase();
+            policy = policy.trim().toLowerCase(Locale.ENGLISH);
             cbDontShowAgain.setSelected(!"ask".equals(policy));
         }
Index: /trunk/src/org/openstreetmap/josm/plugins/PluginInformation.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/plugins/PluginInformation.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/plugins/PluginInformation.java	(revision 8404)
@@ -19,4 +19,5 @@
 import java.util.LinkedList;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 import java.util.TreeMap;
@@ -458,5 +459,5 @@
         if (filter == null) return true;
         if (value == null) return false;
-        return value.toLowerCase().contains(filter.toLowerCase());
+        return value.toLowerCase(Locale.ENGLISH).contains(filter.toLowerCase(Locale.ENGLISH));
     }
 
Index: /trunk/src/org/openstreetmap/josm/tools/ColorHelper.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/ColorHelper.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/tools/ColorHelper.java	(revision 8404)
@@ -3,4 +3,5 @@
 
 import java.awt.Color;
+import java.util.Locale;
 
 /**
@@ -40,5 +41,5 @@
     private static String int2hex(int i) {
         String s = Integer.toHexString(i / 16) + Integer.toHexString(i % 16);
-        return s.toUpperCase();
+        return s.toUpperCase(Locale.ENGLISH);
     }
 
Index: /trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/ImageProvider.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/tools/ImageProvider.java	(revision 8404)
@@ -693,5 +693,5 @@
             }
 
-            ImageType type = name.toLowerCase().endsWith(".svg") ? ImageType.SVG : ImageType.OTHER;
+            ImageType type = Utils.hasExtension(name, "svg") ? ImageType.SVG : ImageType.OTHER;
 
             if (name.startsWith(HTTP_PROTOCOL) || name.startsWith(HTTPS_PROTOCOL)) {
Index: /trunk/src/org/openstreetmap/josm/tools/LanguageInfo.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/LanguageInfo.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/tools/LanguageInfo.java	(revision 8404)
@@ -1,6 +1,4 @@
 // License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.tools;
-
-import static org.openstreetmap.josm.tools.I18n.trc;
 
 import java.util.Collection;
@@ -55,8 +53,8 @@
             return null;
         } else if(code.matches(".+@.+")) {
-          return code.substring(0,1).toUpperCase() + code.substring(1,2)
-          + "-" + code.substring(3,4).toUpperCase() + code.substring(4) + ":";
-        }
-        return code.substring(0,1).toUpperCase() + code.substring(1) + ":";
+          return code.substring(0,1).toUpperCase(Locale.ENGLISH) + code.substring(1,2)
+          + "-" + code.substring(3,4).toUpperCase(Locale.ENGLISH) + code.substring(4) + ":";
+        }
+        return code.substring(0,1).toUpperCase(Locale.ENGLISH) + code.substring(1) + ":";
     }
 
@@ -88,5 +86,5 @@
      * to identify the locale of a localized resource, but in some cases it may use the
      * programmatic name for locales, as replied by {@link Locale#toString()}.
-     * 
+     *
      * For unknown country codes and variants this function already does fallback to
      * internally known translations.
@@ -191,5 +189,5 @@
         return want.equals(newLanguage) || (!want.equals(oldLanguage) && newLanguage.startsWith("en"));
     }
-    
+
     /**
      * Replies the language prefix for use in XML elements (with a dot appended).
Index: /trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java	(revision 8404)
@@ -32,4 +32,5 @@
 import java.util.Collection;
 import java.util.List;
+import java.util.Locale;
 import java.util.Properties;
 
@@ -501,5 +502,5 @@
                 for (FontEntry entry: extrasPref) {
                     Collection<String> fontsAvail = getInstalledFonts();
-                    if (fontsAvail != null && fontsAvail.contains(entry.file.toUpperCase())) {
+                    if (fontsAvail != null && fontsAvail.contains(entry.file.toUpperCase(Locale.ENGLISH))) {
                         if (!allCharSubsets.contains(entry.charset)) {
                             allCharSubsets.add(entry.charset);
Index: /trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java	(revision 8404)
@@ -50,4 +50,5 @@
 import java.util.Enumeration;
 import java.util.List;
+import java.util.Locale;
 
 import javax.swing.JOptionPane;
@@ -320,5 +321,5 @@
                 Path filename = p.getFileName();
                 if (filename != null) {
-                    fontsAvail.add(filename.toString().toUpperCase());
+                    fontsAvail.add(filename.toString().toUpperCase(Locale.ENGLISH));
                 }
             }
Index: /trunk/src/org/openstreetmap/josm/tools/Utils.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 8404)
@@ -42,4 +42,5 @@
 import java.util.Iterator;
 import java.util.List;
+import java.util.Locale;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
@@ -1206,5 +1207,5 @@
         if (value != null) {
             String old = System.setProperty(key, value);
-            if (!key.toLowerCase().contains("password")) {
+            if (!key.toLowerCase(Locale.ENGLISH).contains("password")) {
                 Main.debug("System property '"+key+"' set to '"+value+"'. Old value was '"+old+"'");
             } else {
@@ -1251,3 +1252,31 @@
         }
     }
+
+    /**
+     * Determines if the filename has one of the given extensions, in a robust manner.
+     * The comparison is case and locale insensitive.
+     * @param filename The file name
+     * @param extensions The list of extensions to look for (without dot)
+     * @return {@code true} if the filename has one of the given extensions
+     * @since 8404
+     */
+    public static boolean hasExtension(String filename, String ... extensions) {
+        String name = filename.toLowerCase(Locale.ENGLISH);
+        for (String ext : extensions)
+            if (name.endsWith("."+ext.toLowerCase(Locale.ENGLISH)))
+                return true;
+        return false;
+    }
+
+    /**
+     * Determines if the file's name has one of the given extensions, in a robust manner.
+     * The comparison is case and locale insensitive.
+     * @param file The file
+     * @param extensions The list of extensions to look for (without dot)
+     * @return {@code true} if the file's name has one of the given extensions
+     * @since 8404
+     */
+    public static boolean hasExtension(File file, String ... extensions) {
+        return hasExtension(file.getName(), extensions);
+    }
 }
Index: /trunk/src/org/openstreetmap/josm/tools/template_engine/Variable.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/template_engine/Variable.java	(revision 8403)
+++ /trunk/src/org/openstreetmap/josm/tools/template_engine/Variable.java	(revision 8404)
@@ -3,4 +3,5 @@
 
 import java.util.Collection;
+import java.util.Locale;
 
 public class Variable implements TemplateEntry {
@@ -14,8 +15,8 @@
 
     public Variable(String variableName) {
-        if (variableName.toLowerCase().startsWith(SPECIAL_VARIABLE_PREFIX)) {
+        if (variableName.toLowerCase(Locale.ENGLISH).startsWith(SPECIAL_VARIABLE_PREFIX)) {
             this.variableName = variableName.substring(SPECIAL_VARIABLE_PREFIX.length());
             // special:special:key means that real key named special:key is needed, not special variable
-            this.special = !this.variableName.toLowerCase().startsWith(SPECIAL_VARIABLE_PREFIX);
+            this.special = !this.variableName.toLowerCase(Locale.ENGLISH).startsWith(SPECIAL_VARIABLE_PREFIX);
         } else {
             this.variableName = variableName;
