Changeset 29323 in osm for applications/editors/josm/plugins/wikipedia/src
- Timestamp:
- 2013-03-03T13:28:05+01:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/wikipedia/src/org/wikipedia/WikipediaApp.java
r29218 r29323 99 99 connection.setDoOutput(true); 100 100 101 OutputStreamWriter out = new OutputStreamWriter(connection.getOutputStream() );101 OutputStreamWriter out = new OutputStreamWriter(connection.getOutputStream(), "UTF-8"); 102 102 out.write("articles=" + encodeURL(Utils.join(",", articleNames))); 103 103 out.close(); 104 104 105 105 106 final Scanner scanner = new Scanner(connection.getInputStream() ).useDelimiter("\n");106 final Scanner scanner = new Scanner(connection.getInputStream(), "UTF-8").useDelimiter("\n"); 107 107 while (scanner.hasNext()) { 108 108 //[article]\t[0|1] … … 257 257 + "&article=" + encodeURL(wikipediaArticle); 258 258 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"); 260 260 wiwosmStatus = scanner.hasNextInt() && scanner.nextInt() == 1; 261 261 } catch (IOException ex) {
Note:
See TracChangeset
for help on using the changeset viewer.