Index: /trunk/src/org/openstreetmap/josm/data/CustomConfigurator.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/CustomConfigurator.java	(revision 6551)
+++ /trunk/src/org/openstreetmap/josm/data/CustomConfigurator.java	(revision 6552)
@@ -232,5 +232,5 @@
         try {
             String toXML = Main.pref.toXML(true);
-            InputStream is = new ByteArrayInputStream(toXML.getBytes("UTF-8"));
+            InputStream is = new ByteArrayInputStream(toXML.getBytes(Utils.UTF_8));
             DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();
             builderFactory.setValidating(false);
Index: /trunk/src/org/openstreetmap/josm/data/Preferences.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 6551)
+++ /trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 6552)
@@ -596,5 +596,5 @@
 
         final PrintWriter out = new PrintWriter(new OutputStreamWriter(
-                new FileOutputStream(prefFile + "_tmp"), "utf-8"), false);
+                new FileOutputStream(prefFile + "_tmp"), Utils.UTF_8), false);
         out.print(toXML(false));
         Utils.close(out);
@@ -621,9 +621,9 @@
         if (!Main.applet) {
             File pref = getPreferenceFile();
-            BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(pref), "utf-8"));
+            BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(pref), Utils.UTF_8));
             try {
                 validateXML(in);
                 Utils.close(in);
-                in = new BufferedReader(new InputStreamReader(new FileInputStream(pref), "utf-8"));
+                in = new BufferedReader(new InputStreamReader(new FileInputStream(pref), Utils.UTF_8));
                 fromXML(in);
             } finally {
Index: /trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java	(revision 6551)
+++ /trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java	(revision 6552)
@@ -6,5 +6,4 @@
 import java.io.InputStreamReader;
 import java.io.Reader;
-import java.io.UnsupportedEncodingException;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -368,8 +367,7 @@
      * @param internalConfigFile the filename in data/validator
      * @throws ParseException if the config file does not match MapCSS syntax
-     * @throws UnsupportedEncodingException if UTF-8 charset is not supported on the platform
      */
-    private void addMapCSS(String internalConfigFile) throws ParseException, UnsupportedEncodingException {
-        addMapCSS(new InputStreamReader(getClass().getResourceAsStream("/data/validator/" + internalConfigFile + ".mapcss"), "UTF-8"));
+    private void addMapCSS(String internalConfigFile) throws ParseException {
+        addMapCSS(new InputStreamReader(getClass().getResourceAsStream("/data/validator/" + internalConfigFile + ".mapcss"), Utils.UTF_8));
     }
 
Index: /trunk/src/org/openstreetmap/josm/data/validation/tests/OpeningHourTest.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/tests/OpeningHourTest.java	(revision 6551)
+++ /trunk/src/org/openstreetmap/josm/data/validation/tests/OpeningHourTest.java	(revision 6552)
@@ -26,4 +26,5 @@
 import org.openstreetmap.josm.data.validation.TestError;
 import org.openstreetmap.josm.io.MirroredInputStream;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -53,5 +54,5 @@
         super.initialize();
         if (ENGINE != null) {
-            ENGINE.eval(new InputStreamReader(new MirroredInputStream("resource://data/validator/opening_hours.js"), "UTF-8"));
+            ENGINE.eval(new InputStreamReader(new MirroredInputStream("resource://data/validator/opening_hours.js"), Utils.UTF_8));
             // fake country/state to not get errors on holidays
             ENGINE.eval("var nominatimJSON = {address: {state: 'Bayern', country_code: 'de'}};");
Index: /trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java	(revision 6551)
+++ /trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java	(revision 6552)
@@ -14,5 +14,4 @@
 import java.io.IOException;
 import java.io.InputStreamReader;
-import java.io.UnsupportedEncodingException;
 import java.text.MessageFormat;
 import java.util.ArrayList;
@@ -211,11 +210,5 @@
             try {
                 MirroredInputStream s = new MirroredInputStream(source);
-                InputStreamReader r;
-                try {
-                    r = new InputStreamReader(s, "UTF-8");
-                } catch (UnsupportedEncodingException e) {
-                    r = new InputStreamReader(s);
-                }
-                reader = new BufferedReader(r);
+                reader = new BufferedReader(new InputStreamReader(s, Utils.UTF_8));
 
                 String okValue = null;
Index: /trunk/src/org/openstreetmap/josm/data/validation/tests/UnconnectedWays.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/tests/UnconnectedWays.java	(revision 6551)
+++ /trunk/src/org/openstreetmap/josm/data/validation/tests/UnconnectedWays.java	(revision 6552)
@@ -128,6 +128,8 @@
                     }
                     if (en.hasTag("highway", "turning_circle", "bus_stop")
+                            || en.hasTag("amenity", "parking_entrance")
                             || en.hasTag("railway", "buffer_stop")
                             || OsmUtils.isTrue(en.get("noexit"))
+                            || en.hasKey("entrance")
                             || en.hasKey("barrier")) {
                         continue;
Index: /trunk/src/org/openstreetmap/josm/gui/GettingStarted.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/GettingStarted.java	(revision 6551)
+++ /trunk/src/org/openstreetmap/josm/gui/GettingStarted.java	(revision 6552)
@@ -10,5 +10,4 @@
 import java.awt.event.KeyEvent;
 import java.io.IOException;
-import java.io.UnsupportedEncodingException;
 import java.net.URL;
 import java.util.regex.Matcher;
@@ -31,4 +30,5 @@
 import org.openstreetmap.josm.tools.LanguageInfo;
 import org.openstreetmap.josm.tools.OpenBrowser;
+import org.openstreetmap.josm.tools.Utils;
 import org.openstreetmap.josm.tools.WikiReader;
 
@@ -90,10 +90,5 @@
             Main.pref.put("cache.motd.html.java", myJava);
             Main.pref.put("cache.motd.html.lang", myLang);
-            try {
-                return motd.getBytes("utf-8");
-            } catch(UnsupportedEncodingException e){
-                e.printStackTrace();
-                return new byte[0];
-            }
+            return motd.getBytes(Utils.UTF_8);
         }
 
Index: /trunk/src/org/openstreetmap/josm/gui/download/BookmarkList.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/download/BookmarkList.java	(revision 6551)
+++ /trunk/src/org/openstreetmap/josm/gui/download/BookmarkList.java	(revision 6552)
@@ -188,5 +188,5 @@
                     Main.info("Try loading obsolete bookmarks file");
                     BufferedReader in = new BufferedReader(new InputStreamReader(
-                            new FileInputStream(bookmarkFile), "utf-8"));
+                            new FileInputStream(bookmarkFile), Utils.UTF_8));
 
                     for (String line = in.readLine(); line != null; line = in.readLine()) {
Index: /trunk/src/org/openstreetmap/josm/gui/download/PlaceSelection.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/download/PlaceSelection.java	(revision 6551)
+++ /trunk/src/org/openstreetmap/josm/gui/download/PlaceSelection.java	(revision 6552)
@@ -370,5 +370,5 @@
                 connection.setConnectTimeout(Main.pref.getInteger("socket.timeout.connect",15)*1000);
                 InputStream inputStream = connection.getInputStream();
-                InputSource inputSource = new InputSource(new InputStreamReader(inputStream, "UTF-8"));
+                InputSource inputSource = new InputSource(new InputStreamReader(inputStream, Utils.UTF_8));
                 NameFinderResultParser parser = new NameFinderResultParser();
                 SAXParserFactory.newInstance().newSAXParser().parse(inputSource, parser);
Index: /trunk/src/org/openstreetmap/josm/gui/help/HelpContentReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/help/HelpContentReader.java	(revision 6551)
+++ /trunk/src/org/openstreetmap/josm/gui/help/HelpContentReader.java	(revision 6552)
@@ -50,5 +50,5 @@
             con = Utils.openHttpConnection(u);
             con.connect();
-            in = new BufferedReader(new InputStreamReader(con.getInputStream(),"utf-8"));
+            in = new BufferedReader(new InputStreamReader(con.getInputStream(), Utils.UTF_8));
             return prepareHelpContent(in, dotest, u);
         } catch(MalformedURLException e) {
Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSource.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSource.java	(revision 6551)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSource.java	(revision 6552)
@@ -95,5 +95,5 @@
     public InputStream getSourceInputStream() throws IOException {
         if (css != null) {
-            return new ByteArrayInputStream(css.getBytes("UTF-8"));
+            return new ByteArrayInputStream(css.getBytes(Utils.UTF_8));
         }
         MirroredInputStream in = new MirroredInputStream(url);
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java	(revision 6551)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java	(revision 6552)
@@ -24,5 +24,4 @@
 import java.io.IOException;
 import java.io.InputStreamReader;
-import java.io.UnsupportedEncodingException;
 import java.net.MalformedURLException;
 import java.net.URL;
@@ -1229,11 +1228,5 @@
 
                 MirroredInputStream stream = new MirroredInputStream(url);
-                InputStreamReader r;
-                try {
-                    r = new InputStreamReader(stream, "UTF-8");
-                } catch (UnsupportedEncodingException e) {
-                    r = new InputStreamReader(stream);
-                }
-                reader = new BufferedReader(r);
+                reader = new BufferedReader(new InputStreamReader(stream, Utils.UTF_8));
 
                 String line;
Index: /trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetReader.java	(revision 6551)
+++ /trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetReader.java	(revision 6552)
@@ -10,5 +10,4 @@
 import java.io.InputStreamReader;
 import java.io.Reader;
-import java.io.UnsupportedEncodingException;
 import java.util.Collection;
 import java.util.LinkedList;
@@ -162,10 +161,5 @@
                 zipIcons = s.getFile();
             }
-            InputStreamReader r;
-            try {
-                r = new InputStreamReader(zip == null ? s : zip, "UTF-8");
-            } catch (UnsupportedEncodingException e) {
-                r = new InputStreamReader(zip == null ? s: zip);
-            }
+            InputStreamReader r = new InputStreamReader(zip == null ? s : zip, Utils.UTF_8);
             try {
                 tp = readAll(new BufferedReader(r), validate);
Index: /trunk/src/org/openstreetmap/josm/io/CacheCustomContent.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/CacheCustomContent.java	(revision 6551)
+++ /trunk/src/org/openstreetmap/josm/io/CacheCustomContent.java	(revision 6552)
@@ -8,5 +8,4 @@
 import java.io.FileOutputStream;
 import java.io.IOException;
-import java.io.UnsupportedEncodingException;
 
 import org.openstreetmap.josm.Main;
@@ -120,10 +119,5 @@
     public String updateForceString() throws T {
         updateForce();
-        try {
-            return new String(data, "utf-8");
-        } catch (UnsupportedEncodingException e){
-            e.printStackTrace();
-            return "";
-        }
+        return new String(data, Utils.UTF_8);
     }
 
@@ -144,10 +138,5 @@
      */
     public String getDataString() throws T {
-        try {
-            return new String(getData(), "utf-8");
-        } catch(UnsupportedEncodingException e){
-            e.printStackTrace();
-            return "";
-        }
+        return new String(getData(), Utils.UTF_8);
     }
 
Index: /trunk/src/org/openstreetmap/josm/io/GeoJSONExporter.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/GeoJSONExporter.java	(revision 6551)
+++ /trunk/src/org/openstreetmap/josm/io/GeoJSONExporter.java	(revision 6552)
@@ -29,5 +29,5 @@
         if (layer instanceof OsmDataLayer) {
             String json = new GeoJSONWriter((OsmDataLayer) layer).write();
-            Writer out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), "UTF-8"));
+            Writer out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), Utils.UTF_8));
             try {
                 out.write(json);
Index: /trunk/src/org/openstreetmap/josm/io/GpxWriter.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/GpxWriter.java	(revision 6551)
+++ /trunk/src/org/openstreetmap/josm/io/GpxWriter.java	(revision 6552)
@@ -8,5 +8,4 @@
 import java.io.OutputStreamWriter;
 import java.io.PrintWriter;
-import java.io.UnsupportedEncodingException;
 import java.util.Collection;
 import java.util.Map;
@@ -24,4 +23,5 @@
 import org.openstreetmap.josm.data.gpx.IWithAttributes;
 import org.openstreetmap.josm.data.gpx.WayPoint;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -34,6 +34,6 @@
     }
 
-    public GpxWriter(OutputStream out) throws UnsupportedEncodingException {
-        super(new PrintWriter(new BufferedWriter(new OutputStreamWriter(out, "UTF-8"))));
+    public GpxWriter(OutputStream out) {
+        super(new PrintWriter(new BufferedWriter(new OutputStreamWriter(out, Utils.UTF_8))));
     }
 
Index: /trunk/src/org/openstreetmap/josm/io/OsmApi.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/OsmApi.java	(revision 6551)
+++ /trunk/src/org/openstreetmap/josm/io/OsmApi.java	(revision 6552)
@@ -627,5 +627,5 @@
                     // even if there is no payload.
                     if (requestBody != null) {
-                        BufferedWriter bwr = new BufferedWriter(new OutputStreamWriter(out, "UTF-8"));
+                        BufferedWriter bwr = new BufferedWriter(new OutputStreamWriter(out, Utils.UTF_8));
                         try {
                             bwr.write(requestBody);
Index: /trunk/src/org/openstreetmap/josm/io/OsmChangesetContentParser.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/OsmChangesetContentParser.java	(revision 6551)
+++ /trunk/src/org/openstreetmap/josm/io/OsmChangesetContentParser.java	(revision 6552)
@@ -8,5 +8,4 @@
 import java.io.InputStreamReader;
 import java.io.StringReader;
-import java.io.UnsupportedEncodingException;
 
 import javax.xml.parsers.ParserConfigurationException;
@@ -19,4 +18,5 @@
 import org.openstreetmap.josm.gui.progress.ProgressMonitor;
 import org.openstreetmap.josm.tools.CheckParameterUtil;
+import org.openstreetmap.josm.tools.Utils;
 import org.xml.sax.Attributes;
 import org.xml.sax.InputSource;
@@ -105,10 +105,9 @@
      *
      * @param source the input stream with the changeset content as XML document. Must not be null.
-     * @throws UnsupportedEncodingException if {@code UTF-8} charset is missing
      * @throws IllegalArgumentException if source is {@code null}.
      */
-    public OsmChangesetContentParser(InputStream source) throws UnsupportedEncodingException {
+    public OsmChangesetContentParser(InputStream source) {
         CheckParameterUtil.ensureParameterNotNull(source, "source");
-        this.source = new InputSource(new InputStreamReader(source, "UTF-8"));
+        this.source = new InputSource(new InputStreamReader(source, Utils.UTF_8));
     }
 
Index: /trunk/src/org/openstreetmap/josm/io/OsmChangesetParser.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/OsmChangesetParser.java	(revision 6551)
+++ /trunk/src/org/openstreetmap/josm/io/OsmChangesetParser.java	(revision 6552)
@@ -18,4 +18,5 @@
 import org.openstreetmap.josm.gui.progress.ProgressMonitor;
 import org.openstreetmap.josm.tools.DateUtils;
+import org.openstreetmap.josm.tools.Utils;
 import org.xml.sax.Attributes;
 import org.xml.sax.InputSource;
@@ -214,5 +215,5 @@
             progressMonitor.beginTask("");
             progressMonitor.indeterminateSubTask(tr("Parsing list of changesets..."));
-            InputSource inputSource = new InputSource(new InputStreamReader(source, "UTF-8"));
+            InputSource inputSource = new InputSource(new InputStreamReader(source, Utils.UTF_8));
             SAXParserFactory.newInstance().newSAXParser().parse(inputSource, parser.new Parser());
             return parser.getChangesets();
Index: /trunk/src/org/openstreetmap/josm/io/OsmConnection.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/OsmConnection.java	(revision 6551)
+++ /trunk/src/org/openstreetmap/josm/io/OsmConnection.java	(revision 6552)
@@ -22,4 +22,5 @@
 import org.openstreetmap.josm.io.auth.CredentialsManager;
 import org.openstreetmap.josm.tools.Base64;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -73,5 +74,5 @@
      */
     protected void addBasicAuthorizationHeader(HttpURLConnection con) throws OsmTransferException {
-        CharsetEncoder encoder = Charset.forName("UTF-8").newEncoder();
+        CharsetEncoder encoder = Utils.UTF_8.newEncoder();
         CredentialsAgentResponse response;
         String token;
Index: /trunk/src/org/openstreetmap/josm/io/OsmExporter.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/OsmExporter.java	(revision 6551)
+++ /trunk/src/org/openstreetmap/josm/io/OsmExporter.java	(revision 6552)
@@ -69,5 +69,5 @@
             // create outputstream and wrap it with gzip or bzip, if necessary
             OutputStream out = getOutputStream(file);
-            Writer writer = new OutputStreamWriter(out, "UTF-8");
+            Writer writer = new OutputStreamWriter(out, Utils.UTF_8);
 
             OsmWriter w = OsmWriterFactory.createOsmWriter(new PrintWriter(writer), false, layer.data.getVersion());
Index: /trunk/src/org/openstreetmap/josm/io/OsmHistoryReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/OsmHistoryReader.java	(revision 6551)
+++ /trunk/src/org/openstreetmap/josm/io/OsmHistoryReader.java	(revision 6552)
@@ -16,4 +16,5 @@
 import org.openstreetmap.josm.gui.progress.ProgressMonitor;
 import org.openstreetmap.josm.tools.CheckParameterUtil;
+import org.openstreetmap.josm.tools.Utils;
 import org.xml.sax.Attributes;
 import org.xml.sax.InputSource;
@@ -80,5 +81,5 @@
      */
     public HistoryDataSet parse(ProgressMonitor progressMonitor) throws SAXException, IOException {
-        InputSource inputSource = new InputSource(new InputStreamReader(in, "UTF-8"));
+        InputSource inputSource = new InputSource(new InputStreamReader(in, Utils.UTF_8));
         progressMonitor.beginTask(tr("Parsing OSM history data ..."));
         try {
Index: /trunk/src/org/openstreetmap/josm/io/OsmServerChangesetReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/OsmServerChangesetReader.java	(revision 6551)
+++ /trunk/src/org/openstreetmap/josm/io/OsmServerChangesetReader.java	(revision 6552)
@@ -6,5 +6,4 @@
 
 import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
 import java.text.MessageFormat;
 import java.util.ArrayList;
@@ -185,6 +184,4 @@
             ChangesetDataSet ds = parser.parse(monitor.createSubTaskMonitor(1, true));
             return ds;
-        } catch(UnsupportedEncodingException e) {
-            throw new OsmTransferException(e);
         } catch(OsmDataParsingException e) {
             throw new OsmTransferException(e);
Index: /trunk/src/org/openstreetmap/josm/io/imagery/ImageryReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/imagery/ImageryReader.java	(revision 6551)
+++ /trunk/src/org/openstreetmap/josm/io/imagery/ImageryReader.java	(revision 6552)
@@ -21,4 +21,5 @@
 import org.openstreetmap.josm.io.MirroredInputStream;
 import org.openstreetmap.josm.io.UTFInputStreamReader;
+import org.openstreetmap.josm.tools.Utils;
 import org.xml.sax.Attributes;
 import org.xml.sax.InputSource;
Index: /trunk/src/org/openstreetmap/josm/io/session/GpxTracksSessionExporter.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/session/GpxTracksSessionExporter.java	(revision 6551)
+++ /trunk/src/org/openstreetmap/josm/io/session/GpxTracksSessionExporter.java	(revision 6552)
@@ -17,5 +17,4 @@
 import java.io.OutputStreamWriter;
 import java.io.PrintWriter;
-import java.io.UnsupportedEncodingException;
 import java.io.Writer;
 import java.net.MalformedURLException;
@@ -39,4 +38,5 @@
 import org.openstreetmap.josm.io.session.SessionWriter.ExportSupport;
 import org.openstreetmap.josm.tools.GBC;
+import org.openstreetmap.josm.tools.Utils;
 import org.w3c.dom.Element;
 
@@ -180,10 +180,5 @@
 
     protected void addDataFile(OutputStream out) throws IOException {
-        Writer writer = null;
-        try {
-            writer = new OutputStreamWriter(out, "UTF-8");
-        } catch (UnsupportedEncodingException e) {
-            throw new RuntimeException(e);
-        }
+        Writer writer = new OutputStreamWriter(out, Utils.UTF_8);
         GpxWriter w = new GpxWriter(new PrintWriter(writer));
         w.write(layer.data);
Index: /trunk/src/org/openstreetmap/josm/io/session/MarkerSessionExporter.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/session/MarkerSessionExporter.java	(revision 6551)
+++ /trunk/src/org/openstreetmap/josm/io/session/MarkerSessionExporter.java	(revision 6552)
@@ -8,5 +8,4 @@
 import java.io.OutputStreamWriter;
 import java.io.PrintWriter;
-import java.io.UnsupportedEncodingException;
 import java.io.Writer;
 import java.util.Collection;
@@ -18,4 +17,5 @@
 import javax.swing.SwingConstants;
 
+import org.openstreetmap.josm.tools.Utils;
 import org.w3c.dom.Element;
 
@@ -86,10 +86,5 @@
 
     protected void addDataFile(OutputStream out) throws IOException {
-        Writer writer = null;
-        try {
-            writer = new OutputStreamWriter(out, "UTF-8");
-        } catch (UnsupportedEncodingException e) {
-            throw new RuntimeException(e);
-        }
+        Writer writer = new OutputStreamWriter(out, Utils.UTF_8);
         MarkerWriter w = new MarkerWriter(new PrintWriter(writer));
         w.write(layer);
Index: /trunk/src/org/openstreetmap/josm/io/session/OsmDataSessionExporter.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/session/OsmDataSessionExporter.java	(revision 6551)
+++ /trunk/src/org/openstreetmap/josm/io/session/OsmDataSessionExporter.java	(revision 6552)
@@ -17,5 +17,4 @@
 import java.io.OutputStreamWriter;
 import java.io.PrintWriter;
-import java.io.UnsupportedEncodingException;
 import java.io.Writer;
 import java.net.MalformedURLException;
@@ -34,4 +33,5 @@
 import javax.swing.SwingConstants;
 
+import org.openstreetmap.josm.tools.Utils;
 import org.w3c.dom.Element;
 
@@ -214,10 +214,5 @@
 
     protected void addDataFile(OutputStream out) throws IOException {
-        Writer writer = null;
-        try {
-            writer = new OutputStreamWriter(out, "UTF-8");
-        } catch (UnsupportedEncodingException e) {
-            throw new RuntimeException(e);
-        }
+        Writer writer = new OutputStreamWriter(out, Utils.UTF_8);
         OsmWriter w = OsmWriterFactory.createOsmWriter(new PrintWriter(writer), false, layer.data.getVersion());
         layer.data.getReadLock().lock();
Index: /trunk/src/org/openstreetmap/josm/io/session/SessionWriter.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/session/SessionWriter.java	(revision 6551)
+++ /trunk/src/org/openstreetmap/josm/io/session/SessionWriter.java	(revision 6552)
@@ -225,5 +225,5 @@
     public void writeJos(Document doc, OutputStream out) throws IOException {
         try {
-            OutputStreamWriter writer = new OutputStreamWriter(out, "utf-8");
+            OutputStreamWriter writer = new OutputStreamWriter(out, Utils.UTF_8);
             writer.write("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n");
             TransformerFactory transfac = TransformerFactory.newInstance();
Index: /trunk/src/org/openstreetmap/josm/plugins/PluginListParser.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/plugins/PluginListParser.java	(revision 6551)
+++ /trunk/src/org/openstreetmap/josm/plugins/PluginListParser.java	(revision 6552)
@@ -1,4 +1,6 @@
 // License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins;
+
+import org.openstreetmap.josm.tools.Utils;
 
 import static org.openstreetmap.josm.tools.I18n.tr;
@@ -9,5 +11,4 @@
 import java.io.InputStream;
 import java.io.InputStreamReader;
-import java.io.UnsupportedEncodingException;
 import java.util.LinkedList;
 import java.util.List;
@@ -35,10 +36,8 @@
         try {
             return new PluginInformation(
-                    new ByteArrayInputStream(manifest.getBytes("utf-8")),
+                    new ByteArrayInputStream(manifest.getBytes(Utils.UTF_8)),
                     name.substring(0, name.length() - 4),
                     url
                     );
-        } catch(UnsupportedEncodingException e) {
-            throw new PluginListParseException(tr("Failed to create plugin information from manifest for plugin ''{0}''", name), e);
         } catch (PluginException e) {
             throw new PluginListParseException(tr("Failed to create plugin information from manifest for plugin ''{0}''", name), e);
@@ -61,5 +60,5 @@
         BufferedReader r = null;
         try {
-            r = new BufferedReader(new InputStreamReader(in, "utf-8"));
+            r = new BufferedReader(new InputStreamReader(in, Utils.UTF_8));
             String name = null;
             String url = null;
Index: /trunk/src/org/openstreetmap/josm/plugins/ReadRemotePluginInformationTask.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/plugins/ReadRemotePluginInformationTask.java	(revision 6551)
+++ /trunk/src/org/openstreetmap/josm/plugins/ReadRemotePluginInformationTask.java	(revision 6552)
@@ -17,5 +17,4 @@
 import java.io.OutputStreamWriter;
 import java.io.PrintWriter;
-import java.io.UnsupportedEncodingException;
 import java.net.HttpURLConnection;
 import java.net.MalformedURLException;
@@ -174,5 +173,5 @@
                 connection.setRequestProperty("Accept-Charset", "utf-8");
             }
-            in = new BufferedReader(new InputStreamReader(connection.getInputStream(), "UTF-8"));
+            in = new BufferedReader(new InputStreamReader(connection.getInputStream(), Utils.UTF_8));
             StringBuilder sb = new StringBuilder();
             while ((line = in.readLine()) != null) {
@@ -207,5 +206,5 @@
             try {
                 String line;
-                err = new BufferedReader(new InputStreamReader(errStream, "UTF-8"));
+                err = new BufferedReader(new InputStreamReader(errStream, Utils.UTF_8));
                 while ((line = err.readLine()) != null) {
                     sb.append(line).append("\n");
@@ -319,5 +318,5 @@
             File cacheFile = createSiteCacheFile(pluginDir, site, CacheType.PLUGIN_LIST);
             getProgressMonitor().subTask(tr("Writing plugin list to local cache ''{0}''", cacheFile.toString()));
-            writer = new PrintWriter(new OutputStreamWriter(new FileOutputStream(cacheFile), "utf-8"));
+            writer = new PrintWriter(new OutputStreamWriter(new FileOutputStream(cacheFile), Utils.UTF_8));
             writer.write(list);
         } catch(IOException e) {
@@ -363,10 +362,7 @@
         try {
             getProgressMonitor().subTask(tr("Parsing plugin list from site ''{0}''", site));
-            InputStream in = new ByteArrayInputStream(doc.getBytes("UTF-8"));
+            InputStream in = new ByteArrayInputStream(doc.getBytes(Utils.UTF_8));
             List<PluginInformation> pis = new PluginListParser().parse(in);
             availablePlugins.addAll(filterDeprecatedPlugins(pis));
-        } catch (UnsupportedEncodingException e) {
-            Main.error(tr("Failed to parse plugin list document from site ''{0}''. Skipping site. Exception was: {1}", site, e.toString()));
-            e.printStackTrace();
         } catch (PluginListParseException e) {
             Main.error(tr("Failed to parse plugin list document from site ''{0}''. Skipping site. Exception was: {1}", site, e.toString()));
Index: /trunk/src/org/openstreetmap/josm/tools/BugReportExceptionHandler.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/BugReportExceptionHandler.java	(revision 6551)
+++ /trunk/src/org/openstreetmap/josm/tools/BugReportExceptionHandler.java	(revision 6552)
@@ -194,5 +194,5 @@
             ByteArrayOutputStream out = new ByteArrayOutputStream();
             GZIPOutputStream gzip = new GZIPOutputStream(out);
-            gzip.write(debugText.getBytes("UTF-8"));
+            gzip.write(debugText.getBytes(Utils.UTF_8));
             Utils.close(gzip);
 
Index: /trunk/src/org/openstreetmap/josm/tools/I18n.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/I18n.java	(revision 6551)
+++ /trunk/src/org/openstreetmap/josm/tools/I18n.java	(revision 6552)
@@ -548,5 +548,5 @@
                         if(rval != val) /* file corrupt */
                             return false;
-                        enstrings[i] = new String(str, 0, val, "utf-8");
+                        enstrings[i] = new String(str, 0, val, Utils.UTF_8);
                     }
                     for(int i = 0; i < trnum; ++i)
@@ -562,5 +562,5 @@
                         if(rval != val) /* file corrupt */
                             return false;
-                        trstrings[i] = new String(str, 0, val, "utf-8");
+                        trstrings[i] = new String(str, 0, val, Utils.UTF_8);
                     }
                     if(trnum > 0 && !p.containsKey(enstrings[0])) {
@@ -600,5 +600,5 @@
                         if(val != enval) /* file corrupt */
                             return false;
-                        String enstr = new String(str, 0, enval, "utf-8");
+                        String enstr = new String(str, 0, enval, Utils.UTF_8);
                         if(trval != 0)
                         {
@@ -606,5 +606,5 @@
                             if(val != trval) /* file corrupt */
                                 return false;
-                            String trstr = new String(str, 0, trval, "utf-8");
+                            String trstr = new String(str, 0, trval, Utils.UTF_8);
                             if(!s.containsKey(enstr))
                                 s.put(enstr, trstr);
Index: /trunk/src/org/openstreetmap/josm/tools/Utils.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 6551)
+++ /trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 6552)
@@ -23,9 +23,9 @@
 import java.io.InputStreamReader;
 import java.io.OutputStream;
-import java.io.UnsupportedEncodingException;
 import java.net.HttpURLConnection;
 import java.net.URL;
 import java.net.URLConnection;
 import java.nio.channels.FileChannel;
+import java.nio.charset.Charset;
 import java.security.MessageDigest;
 import java.security.NoSuchAlgorithmException;
@@ -56,4 +56,11 @@
     }
 
+    /**
+     * UTF-8 (UCS Transformation Format—8-bit).
+     *
+     * <p>Every implementation of the Java platform is required to support UTF-8 (see {@link Charset}).</p>
+     */
+    public static final Charset UTF_8 = Charset.forName("UTF-8");
+
     public static <T> boolean exists(Iterable<? extends T> collection, Predicate<? super T> predicate) {
         for (T item : collection) {
@@ -436,10 +443,5 @@
      */
     public static String md5Hex(String data) {
-        byte[] byteData = null;
-        try {
-            byteData = data.getBytes("UTF-8");
-        } catch (UnsupportedEncodingException e) {
-            throw new RuntimeException();
-        }
+        byte[] byteData = data.getBytes(UTF_8);
         MessageDigest md = null;
         try {
@@ -707,5 +709,5 @@
      */
     public static BufferedReader openURLReaderAndDecompress(final URL url, final boolean decompress) throws IOException {
-        return new BufferedReader(new InputStreamReader(openURLAndDecompress(url, decompress), "utf-8"));
+        return new BufferedReader(new InputStreamReader(openURLAndDecompress(url, decompress), UTF_8));
     }
 
Index: /trunk/test/unit/org/openstreetmap/josm/io/OsmChangesetContentParserTest.groovy
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/io/OsmChangesetContentParserTest.groovy	(revision 6551)
+++ /trunk/test/unit/org/openstreetmap/josm/io/OsmChangesetContentParserTest.groovy	(revision 6552)
@@ -2,5 +2,6 @@
 package org.openstreetmap.josm.io;
 
-import org.junit.Test 
+import org.junit.Test
+import org.openstreetmap.josm.tools.Utils
 
 import static org.junit.Assert.*;
@@ -42,9 +43,9 @@
 		
 		// should be OK 
-		parser = new OsmChangesetContentParser(new ByteArrayInputStream(doc.getBytes("UTF-8")))
+		parser = new OsmChangesetContentParser(new ByteArrayInputStream(doc.getBytes(Utils.UTF_8)))
 		parser.parse null
 		
 		// should be OK 
-		parser = new OsmChangesetContentParser(new ByteArrayInputStream(doc.getBytes("UTF-8")))		
+		parser = new OsmChangesetContentParser(new ByteArrayInputStream(doc.getBytes(Utils.UTF_8)))
 		parser.parse NullProgressMonitor.INSTANCE
 		
