Ignore:
Timestamp:
2013-12-28T00:30:15+01:00 (10 years ago)
Author:
simon04
Message:

Refactoring: introduce Utils.UTF_8 charset to avoid handling of UnsupportedEncodingException

According to the Javadoc of Charset, every implementation of the Java
platform is required to support UTF-8.

Location:
trunk/src/org/openstreetmap/josm/gui/download
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/download/BookmarkList.java

    r6380 r6552  
    188188                    Main.info("Try loading obsolete bookmarks file");
    189189                    BufferedReader in = new BufferedReader(new InputStreamReader(
    190                             new FileInputStream(bookmarkFile), "utf-8"));
     190                            new FileInputStream(bookmarkFile), Utils.UTF_8));
    191191
    192192                    for (String line = in.readLine(); line != null; line = in.readLine()) {
  • trunk/src/org/openstreetmap/josm/gui/download/PlaceSelection.java

    r6316 r6552  
    370370                connection.setConnectTimeout(Main.pref.getInteger("socket.timeout.connect",15)*1000);
    371371                InputStream inputStream = connection.getInputStream();
    372                 InputSource inputSource = new InputSource(new InputStreamReader(inputStream, "UTF-8"));
     372                InputSource inputSource = new InputSource(new InputStreamReader(inputStream, Utils.UTF_8));
    373373                NameFinderResultParser parser = new NameFinderResultParser();
    374374                SAXParserFactory.newInstance().newSAXParser().parse(inputSource, parser);
Note: See TracChangeset for help on using the changeset viewer.