code: def ReplaceHomoglyphs(s):
      
      homoglyphs = {
          '\xa0': ' ',  # &nbsp; ?
          '\u00e3': '',  # TODO(gsfowler) drop after .proto spurious char elided
          '\u00a0': ' ',  # &nbsp; ?
          '\u00a9': '(C)',  # COPYRIGHT SIGN (would you believe "asciiglyph"?)
          '\u00ae': '(R)',  # REGISTERED SIGN (would you believe "asciiglyph"?)
          '\u2014': '-',  # EM DASH
          '\u2018': "'",  # LEFT SINGLE QUOTATION MARK
          '\u2019': "'",  # RIGHT SINGLE QUOTATION MARK
          '\u201c': '"',  # LEFT DOUBLE QUOTATION MARK
          '\u201d': '"',  # RIGHT DOUBLE QUOTATION MARK
          '\u2026': '...',  # HORIZONTAL ELLIPSIS
          '\u2e3a': '-',  # TWO-EM DASH
      }
  
      def _ReplaceOne(c):
          """Returns the homoglyph or escaped replacement for c."""
          equiv = homoglyphs.get(c)
          if equiv is not None:
              return equiv
          try:
              c.encode('ascii')
              return c
          except UnicodeError:
              pass
          try:
              return c.encode('unicode-escape').decode('ascii')
          except UnicodeError:
              return '?'
  
      return ''.join([_ReplaceOne(c) for c in s])
docs: Returns s with unicode homoglyphs replaced by ascii equivalents.