Changeset 2342 in josm
- Timestamp:
- 2009-10-28T19:37:10+01:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/GpxReader.java
r2211 r2342 58 58 private StringBuffer accumulator = new StringBuffer(); 59 59 60 private boolean nokiaSportsTrackerBug = false; 61 60 62 @Override public void startDocument() { 61 63 accumulator = new StringBuffer(); … … 99 101 states.push(currentState); 100 102 currentState = state.ext; 103 } else if (qName.equals("gpx") && atts.getValue("creator").startsWith("Nokia Sports Tracker")) { 104 nokiaSportsTrackerBug = true; 101 105 } 102 106 break; … … 178 182 179 183 @Override public void characters(char[] ch, int start, int length) { 184 /** 185 * Remove illegal characters generated by the Nokia Sports Tracker device. 186 * Don't do this crude substitution for all files, since it would destroy 187 * certain unicode characters. 188 */ 189 if (nokiaSportsTrackerBug) { 190 for (int i=0; i<ch.length; ++i) { 191 if (ch[i] == 1) { 192 ch[i] = 32; 193 } 194 } 195 nokiaSportsTrackerBug = false; 196 } 197 180 198 accumulator.append(ch, start, length); 181 199 }
Note:
See TracChangeset
for help on using the changeset viewer.