Next / Previous / Contents / Shipman's homepage

20.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.replace ( u'\xf1', 'n' )