Changeset 16954 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2020-08-29T07:53:12+02:00 (4 years ago)
Author:
simon04
Message:

see #19624 - specify UTF-8 (Java Warnings)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/GeoJSONReader.java

    r16948 r16954  
    386386        ds.setUploadPolicy(UploadPolicy.DISCOURAGED);
    387387        if (isLineDelimited(markSupported)) {
    388             BufferedReader reader = new BufferedReader(new InputStreamReader(markSupported));
     388            BufferedReader reader = new BufferedReader(new InputStreamReader(markSupported, StandardCharsets.UTF_8));
    389389            String line = null;
    390390            String rs = new String(new byte[]{RECORD_SEPARATOR_BYTE}, StandardCharsets.US_ASCII);
     
    392392                while ((line = reader.readLine()) != null) {
    393393                    line = line.replaceFirst(rs, "");
    394                     try (InputStream is = new ByteArrayInputStream(line.getBytes())) {
     394                    try (InputStream is = new ByteArrayInputStream(line.getBytes(StandardCharsets.UTF_8))) {
    395395                        parse(is);
    396396                    }
Note: See TracChangeset for help on using the changeset viewer.