Changeset 29323 in osm for applications


Ignore:
Timestamp:
2013-03-03T13:28:05+01:00 (11 years ago)
Author:
simon04
Message:

JOSM/wikipedia: use UTF-8 encoding (fix #josm8482)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/wikipedia/src/org/wikipedia/WikipediaApp.java

    r29218 r29323  
    9999                connection.setDoOutput(true);
    100100
    101                 OutputStreamWriter out = new OutputStreamWriter(connection.getOutputStream());
     101                OutputStreamWriter out = new OutputStreamWriter(connection.getOutputStream(), "UTF-8");
    102102                out.write("articles=" + encodeURL(Utils.join(",", articleNames)));
    103103                out.close();
    104104
    105105
    106                 final Scanner scanner = new Scanner(connection.getInputStream()).useDelimiter("\n");
     106                final Scanner scanner = new Scanner(connection.getInputStream(), "UTF-8").useDelimiter("\n");
    107107                while (scanner.hasNext()) {
    108108                    //[article]\t[0|1]
     
    257257                        + "&article=" + encodeURL(wikipediaArticle);
    258258                System.out.println("Wikipedia: GET " + url);
    259                 final Scanner scanner = new Scanner(new URL(url).openStream());
     259                final Scanner scanner = new Scanner(new URL(url).openStream(), "UTF-8");
    260260                wiwosmStatus = scanner.hasNextInt() && scanner.nextInt() == 1;
    261261            } catch (IOException ex) {
Note: See TracChangeset for help on using the changeset viewer.