From 3d792b9f38def775e1609b95cc97e95647f51b2e Mon Sep 17 00:00:00 2001 From: Benny Malengier Date: Fri, 31 Aug 2007 15:06:51 +0000 Subject: [PATCH] unicode char feature 1199 svn: r8908 --- ChangeLog | 3 +++ src/PlaceUtils.py | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1fe669bec..c4e29fa02 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2007-08-31 Benny Malengier + * src/PlaceUtils.py: request #1199: replace unicode symbols with u codes + 2007-08-31 Don Allingham * src/ExportAssistant.py (ExportAssistant.pulse_progressbar): fix display value, crashed if text wasn't specified diff --git a/src/PlaceUtils.py b/src/PlaceUtils.py index fa298f2b7..a4ce8bf8d 100644 --- a/src/PlaceUtils.py +++ b/src/PlaceUtils.py @@ -176,15 +176,15 @@ def conv_lat_lon(latitude, longitude, format="D.D4"): #allow to input " as '' val = val.replace( r"''",r'"') #allow some special unicode symbols - val = val.replace( u"″",r'"') - val = val.replace( u"′",r"'") + val = val.replace( u'\u2033',r'"') + val = val.replace( u'\u2032',r"'") #ignore spaces val = val.replace(r'\s*', r'') # get the degrees, must be present if val.find(r'_') != -1: l = val.split('_') if len(l) != 2: - error = True + error = True else: try: degs = int(l[0]) #degrees must be integer value