Next / Previous / Contents / Shipman's homepage

21.2. FlatSighting.sanitize(): Strip Unicode characters from locality name
# - - -   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')