def utf8_keys(dictionary):
 return dict([(key.encode('utf8'), val) for (key, val) in dictionary.items()])

def utf8_keys ( dictionary ) : return dict ( [ ( key . encode ( 'utf8' ) , val ) for ( key , val ) in dictionary . items ( ) ] )
convert dictionary keys to utf8-encoded strings for mapnik .