organicmaps icon indicating copy to clipboard operation
organicmaps copied to clipboard

Opening hours not parsed due to non-standard dash

Open hb0nd opened this issue 3 years ago â€Ē 5 comments

Found opening-hours that should have been parsed: Mo-Sa 07:00–18:00; Su 09:00-14:00 (https://www.openstreetmap.org/node/5022879262) on closer inspection, the dash between Mo & Sa is actually an En Dash instead of a standard Hyphen-Minus. technically this is an OSM data issue, but it would be good to handle it.

need to convert all similar dashes in the generator (although not characters within quotation marks): ‐ HYPHEN ‑ NON-BREAKING HYPHEN ‒ FIGURE DASH – EN DASH ïđ˜SMALL EM DASH ۔‎ ARABIC FULL STOP ⁃ HYPHEN BULLET ˗ MODIFIER LETTER MINUS SIGN − MINUS SIGN ➖ HEAVY MINUS SIGN âēš COPTIC CAPITAL LETTER DIALECT-P NI

(similar characters found from https://www.unicode.org/Public/security/15.0.0/confusables.txt)

hb0nd avatar Nov 15 '22 09:11 hb0nd

Should these dashes be replaced only in opening_hours tags, or also somewhere else?

biodranik avatar Nov 15 '22 13:11 biodranik

Anywhere that makes use of the opening_hours specification. It'd be good to have a generic function to correct opening_hours-like values like this

hb0nd avatar Jul 03 '23 21:07 hb0nd

Just to chime in, I'm trying to fix this on OSM data. But of course, there is no guarantee, after fixing, that this will happen again. For an example, OsmAND can parse the data, even with non-standard dashes.

matheusgomesms avatar Mar 07 '24 14:03 matheusgomesms

Converting dashes in the generator specifically for opening hours is a good idea. Maybe there are other chars too that we can normalize? Numbers? punctuation? Did someone run the analysis?

biodranik avatar Mar 07 '24 22:03 biodranik

Converting dashes in the generator specifically for opening hours is a good idea. Maybe there are other chars too that we can normalize? Numbers? punctuation? Did someone run the analysis?

Check some analysis here, please: https://community.openstreetmap.org/t/automated-edit-proposal-convert-non-standard-dashes-to-standard-dashes/110206/50 (ran by @westnordost)

matheusgomesms avatar Apr 28 '24 22:04 matheusgomesms