diff options
Diffstat (limited to 'chimere/utils.py')
-rw-r--r-- | chimere/utils.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/chimere/utils.py b/chimere/utils.py index b2c8ccc..97f710f 100644 --- a/chimere/utils.py +++ b/chimere/utils.py @@ -22,6 +22,7 @@ Utilitaries """ import urllib2, re +import unicodedata from external_utils import OsmApi from lxml import etree from chimere import get_version @@ -30,6 +31,11 @@ from django.conf import settings from django.core.exceptions import ObjectDoesNotExist from django.utils.translation import ugettext_lazy as _ +def unicode_normalize(string): + return ''.join( + (c for c in unicodedata.normalize('NFD', string) + if unicodedata.category(c) != 'Mn')) + class ImportManager: u""" Generic class for specific importers @@ -130,7 +136,7 @@ RE_NODE = re.compile('node\[([^\]]*)\]') class OSMManager(ImportManager): u""" - OSM importer + OSM importer/exporter The source url is a path to an OSM file or a XAPI url The filtr argument is XAPI args or empty if it is an OSM file. """ |