CityGenerator / Megacosm-Generator

A tool for creating fantasy campaign settings, including maps, regions, flags, cities, NPCs, businesses, legends, lore and more.
GNU General Public License v2.0
69 stars 30 forks source link

unicode error in data #102

Closed morgajel closed 8 years ago

morgajel commented 10 years ago

A recert merge to mundaneitems data brought a special quote [’] which broke mundane items with the error UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 24: ordinal not in range(128)

This needs to be better handled. One options- implement something like this in the importer:

def is_ascii(s):
    return all(ord(c) < 128 for c in s)