ethan-nelson / osm_hall_monitor

Passive changeset surveillance for OpenStreetMap
MIT License
29 stars 3 forks source link

User watching issue with unicode #9

Closed ethan-nelson closed 8 years ago

ethan-nelson commented 8 years ago

Python is ignoring some names with Unicode characters. Need to change this comparison https://github.com/ethan-nelson/osm_hall_monitor/blob/master/osmhm/filters.py#L82 to allow Unicode characters and also wildcards.

ethan-nelson commented 8 years ago

Adding to the fnmatch call watched_user['username'].decode('utf-8') seems to help match. The other issue is the presence of spaces or lack thereof in the name--either in the watched name or in a name being checked.

ethan-nelson commented 8 years ago

Or rather, encoding the list of usernames from changesets to utf-8 will probably be more efficient in the long run. Confirmed that this solves the problem as well.

ethan-nelson commented 8 years ago

Fixed in https://github.com/ethan-nelson/osm_hall_monitor/commit/2bd86964377504d634d4d34779dc484ec0845555.