code: def com_google_fonts_check_name_ascii_only_entries(ttFont):
    
    bad_entries = []
    for name in ttFont["name"].names:
      if name.nameID == NameID.COPYRIGHT_NOTICE or \
         name.nameID == NameID.POSTSCRIPT_NAME:
        string = name.string.decode(name.getEncoding())
        try:
          string.encode('ascii')
        except:
          bad_entries.append(name)
          yield INFO, ("Bad string at"
                       " [nameID {}, '{}']:"
                       " '{}'"
                       "").format(name.nameID,
                                  name.getEncoding(),
                                  string.encode("ascii",
                                                errors='xmlcharrefreplace'))
    if len(bad_entries) > 0:
      yield FAIL, ("There are {} strings containing"
                   " non-ASCII characters in the ASCII-only"
                   " NAME table entries.").format(len(bad_entries))
    else:
      yield PASS, ("None of the ASCII-only NAME table entries"
                   " contain non-ASCII characteres.")
docs: Are there non-ASCII characters in ASCII-only NAME table entries?