comparison flys-backend/contrib/shpimporter/utils.py @ 5219:40dc001594e4

Allow unicode river names
author Andre Heinecke <aheinecke@intevation.de>
date Mon, 11 Mar 2013 15:49:35 +0100
parents 04eb62eae722
children 3f35d9db48c1
comparison
equal deleted inserted replaced
5218:028ff568b196 5219:40dc001594e4
39 # This is stupid and shoudl not be neccessary. But I don't 39 # This is stupid and shoudl not be neccessary. But I don't
40 # know how to make it work both ways. aheinecke - 02/2013 40 # know how to make it work both ways. aheinecke - 02/2013
41 stmt = SQL_SELECT_RIVER_ID_ORA 41 stmt = SQL_SELECT_RIVER_ID_ORA
42 else: 42 else:
43 stmt = SQL_SELECT_RIVER_ID 43 stmt = SQL_SELECT_RIVER_ID
44 cur.execute(stmt, (name,)) 44 cur.execute(stmt, (getUTF8(name),))
45 row = cur.fetchone() 45 row = cur.fetchone()
46 if row: 46 if row:
47 return row[0] 47 return row[0]
48 else: 48 else:
49 return 0 49 return 0

http://dive4elements.wald.intevation.org