Ticket #518 (closed defect: fixed)
[PATCH] Unicode normalization
| Reported by: | moyogo@… | Owned by: | framm |
|---|---|---|---|
| Priority: | trivial | Component: | Core |
| Version: | latest | Keywords: | |
| Cc: |
Description
JOSM should normalize strings at input. They should also be normalized when searching.
For example inputing name="Rue de l'École" should end up the same as name="Rue de l'École". The first has "É" as U+0045 LATIN CAPITAL LETTER E + U+0301 COMBINING ACUTE ACCENT while the second has "É" U+00C9 LATIN CAPITAL LETTER E WITH ACUTE. Searching for one should match the other.
See http://unicode.org/faq/normalization.html for more info.
java.text.Normalizer.normalize(string, java.text.Normalizer.Form.NFC) can be used when required. NFC is probably better because it's better supported than NFD due to legacy.
Attachments
Change History
Changed 4 years ago by moyogo@…
-
attachment
josm-normalization.patch
added



normalizing strings before comparison in SearchCompiler, and value in PropertiesDialog