Ignore:
Timestamp:
2013-06-07T01:05:24+02:00 (12 years ago)
Author:
donvip
Message:

[josm_osmarender] fix #josm5721 - Encode output files in UTF-8

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/osmarender/src/org/openstreetmap/josm/plugins/osmarender/OsmarenderPlugin.java

    r29638 r29639  
    1010import java.io.FileReader;
    1111import java.io.IOException;
     12import java.io.OutputStreamWriter;
    1213import java.io.PrintWriter;
    1314import java.util.HashSet;
     
    7475            try {
    7576                // write to plugin dir
    76                 OsmWriter w = OsmWriterFactory.createOsmWriter(new PrintWriter(new FileOutputStream(getPluginDir()+File.separator+"data.osm")), false, "0.6");
     77                OsmWriter w = OsmWriterFactory.createOsmWriter(new PrintWriter(new OutputStreamWriter(
     78                        new FileOutputStream(getPluginDir()+File.separator+"data.osm"), "UTF-8")), false, "0.6");
    7779                w.header();
    7880
     
    198200        BufferedReader reader = new BufferedReader(
    199201                new FileReader( getPluginDir() + File.separator + "osm-map-features.xml") );
    200         PrintWriter writer = new PrintWriter( getPluginDir() + File.separator + "generated.xml");
    201 
    202         // osm-map-fetaures.xml contain two placemark
     202        PrintWriter writer = new PrintWriter( getPluginDir() + File.separator + "generated.xml", "UTF-8");
     203
     204        // osm-map-features.xml contain two placemark
    203205        // (bounds_mkr1 and bounds_mkr2). We write the bounds tag
    204206        // between the two
Note: See TracChangeset for help on using the changeset viewer.