Changeset 6410 in josm for trunk/src


Ignore:
Timestamp:
2013-11-25T01:23:30+01:00 (11 years ago)
Author:
Don-vip
Message:
  • tagchecker: ignore keys starting with source:
  • utils: handle unicode character '\uFEFF' (ZERO WIDTH NO-BREAK SPACE)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/Utils.java

    r6362 r6410  
    701701            char c = str.charAt(start);
    702702            // '\u200B' (ZERO WIDTH SPACE character) needs to be handled manually because of change in Unicode 6.0 (Java 7, see #8918)
    703             leadingWhite = (Character.isWhitespace(c) || Character.isSpaceChar(c) || c == '\u200B');
     703            // same for '\uFEFF' (ZERO WIDTH NO-BREAK SPACE)
     704            leadingWhite = (Character.isWhitespace(c) || Character.isSpaceChar(c) || c == '\u200B' || c == '\uFEFF');
    704705            if (leadingWhite) {
    705706                start++;
     
    709710        while (trailingWhite && end > start+1) {
    710711            char c = str.charAt(end-1);
    711             trailingWhite = (Character.isWhitespace(c) || Character.isSpaceChar(c) || c == '\u200B');
     712            trailingWhite = (Character.isWhitespace(c) || Character.isSpaceChar(c) || c == '\u200B' || c == '\uFEFF');
    712713            if (trailingWhite) {
    713714                end--;
Note: See TracChangeset for help on using the changeset viewer.