Changeset 19121 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2024-06-20T16:40:27+02:00 (7 months ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/Preferences.java
r19095 r19121 444 444 445 445 try (PreferencesWriter writer = new PreferencesWriter( 446 new PrintWriter(prefFile + "_tmp", StandardCharsets.UTF_8 .name()), false, defaults)) {446 new PrintWriter(prefFile + "_tmp", StandardCharsets.UTF_8), false, defaults)) { 447 447 writer.write(settings); 448 448 } catch (SecurityException e) { -
trunk/src/org/openstreetmap/josm/plugins/ReadRemotePluginInformationTask.java
r18211 r19121 253 253 File cacheFile = createSiteCacheFile(pluginDir, site); 254 254 getProgressMonitor().subTask(tr("Writing plugin list to local cache ''{0}''", cacheFile.toString())); 255 try (PrintWriter writer = new PrintWriter(cacheFile, StandardCharsets.UTF_8 .name())) {255 try (PrintWriter writer = new PrintWriter(cacheFile, StandardCharsets.UTF_8)) { 256 256 writer.write(list); 257 257 writer.flush(); -
trunk/src/org/openstreetmap/josm/tools/Utils.java
r19112 r19121 15 15 import java.io.IOException; 16 16 import java.io.InputStream; 17 import java.io.UnsupportedEncodingException;18 17 import java.net.MalformedURLException; 19 18 import java.net.URI; … … 1139 1138 */ 1140 1139 public static String encodeUrl(String s) { 1141 final String enc = StandardCharsets.UTF_8.name(); 1142 try { 1143 return URLEncoder.encode(s, enc); 1144 } catch (UnsupportedEncodingException e) { 1145 throw new IllegalStateException(e); 1146 } 1140 return URLEncoder.encode(s, StandardCharsets.UTF_8); 1147 1141 } 1148 1142 … … 1159 1153 */ 1160 1154 public static String decodeUrl(String s) { 1161 final String enc = StandardCharsets.UTF_8.name(); 1162 try { 1163 return URLDecoder.decode(s, enc); 1164 } catch (UnsupportedEncodingException e) { 1165 throw new IllegalStateException(e); 1166 } 1155 return URLDecoder.decode(s, StandardCharsets.UTF_8); 1167 1156 } 1168 1157
Note:
See TracChangeset
for help on using the changeset viewer.