Changeset 6995 in josm for trunk/src/org/openstreetmap/josm/tools
- Timestamp:
- 2014-04-23T02:30:39+02:00 (10 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
r6987 r6995 543 543 } else { 544 544 try { 545 bytes = URLDecoder.decode(data, " utf-8").getBytes();545 bytes = URLDecoder.decode(data, "UTF-8").getBytes(Utils.UTF_8); 546 546 } catch (IllegalArgumentException ex) { 547 547 Main.warn("Unable to decode URL data part: "+ex.getMessage() + " (" + data + ")"); … … 550 550 } 551 551 if (mediatype != null && mediatype.contains("image/svg+xml")) { 552 String s = new String(bytes );552 String s = new String(bytes, Utils.UTF_8); 553 553 URI uri = getSvgUniverse().loadSVG(new StringReader(s), URLEncoder.encode(s, "UTF-8")); 554 554 SVGDiagram svg = getSvgUniverse().getDiagram(uri); -
trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java
r6977 r6995 10 10 import java.io.BufferedReader; 11 11 import java.io.File; 12 import java.io.File Reader;12 import java.io.FileInputStream; 13 13 import java.io.IOException; 14 14 import java.io.InputStreamReader; … … 227 227 // Try lsb_release (only available on LSB-compliant Linux systems, see https://www.linuxbase.org/lsb-cert/productdir.php?by_prod ) 228 228 Process p = Runtime.getRuntime().exec("lsb_release -ds"); 229 BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream() ));229 BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream(), Utils.UTF_8)); 230 230 String line = Utils.strip(input.readLine()); 231 231 Utils.close(input); … … 312 312 BufferedReader reader = null; 313 313 try { 314 reader = new BufferedReader(new FileReader(file));314 reader = new BufferedReader(new InputStreamReader(new FileInputStream(file), Utils.UTF_8)); 315 315 String id = null; 316 316 String release = null; -
trunk/src/org/openstreetmap/josm/tools/Utils.java
r6977 r6995 812 812 } 813 813 Process p = new ProcessBuilder(command).start(); 814 BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream() ));814 BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream(), UTF_8)); 815 815 StringBuilder all = null; 816 816 String line;
Note:
See TracChangeset
for help on using the changeset viewer.