Opened 9 years ago
Closed 9 years ago
#12499 closed enhancement (fixed)
Detect and fix names with multiple spaces
Reported by: | naoliv | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 16.02 |
Component: | Core validator | Version: | |
Keywords: | space | Cc: |
Description (last modified by )
Sometimes I see objects with multiple spaces at the middle of their names.
For example, something like name=Foo␣␣Bar
(two spaces between the words)
Could JOSM detect and remove them, please?
Attachments (0)
Change History (8)
comment:2 by , 9 years ago
Exactly, repeated and sequential whitespaces (ie, name=A␣␣B␣␣␣C
)
And I don't know about XMLparser.
comment:3 by , 9 years ago
And I don't know about XMLparser.
The default behavior of a XML parser is replacing all whitespace sequences (space, tab, cr, ...) by a single space. If you want to preserve multiple whitespaces, you need a CDATA block or some parsers allow a special mode to prevent this behavior.
On upload (and parsing on the server) there is a good chance that this is automatically "correctd".
Are you able to upload a name with multiple sequential whitespaces?
comment:4 by , 9 years ago
I can't create and upload it, but I see data in OSM with multiple spaces.
If I download one area with objects like this I would like to have them detected and fixed.
Sometimes I am able to indirectly locate them because JOSM detects similar names. For example, name=Street␣A␣B␣C
and name=Street␣A␣␣B␣C
.
So what I would like to have is similar to what the validator already does when a value starts or ends with a whitespace: it gives a warning and offers to fix it.
comment:5 by , 9 years ago
Description: | modified (diff) |
---|
comment:6 by , 9 years ago
Keywords: | space added |
---|---|
Milestone: | → 16.02 |
Sorry - missunderstanding. You want to replace repeated spaces in a word. This sound useful.
Will this not automatically done by XMLparser?