birdnotes.py: Objects to represent bird note files
21.2. FlatSighting.sanitize(): Strip Unicode
characters from locality name
birdnotes.py
# - - - F l a t S i g h t i n g . s a n i t i z e
def sanitize(self, s):
'''Substitute ASCII for Unicode characters.
So far the only Unicode that occurs is ñ.
'''
return s.encode('ascii', 'replace')