'We define three types of bytes:
alphabet: english alphabets [a-zA-Z]
international: international characters [-ÿ]
marker: everything else [^a-zA-Z-ÿ]
The input buffer can be thought to contain a series of words delimited
by markers. This function works to filter all words that contain at
least one international character. All contiguous sequences of markers
are replaced by a single space ascii character.
This filter applies to all scripts which do not use English characters.'

@staticmethod
def filter_international_words(buf):

    filtered = bytearray()
    words = re.findall('[a-zA-Z]*[\x80-\xff]+[a-zA-Z]*[^a-zA-Z\x80-\xff]?', buf)
    for word in words:
        filtered.extend(word[:(-1)])
        last_char = word[(-1):]
        if ((not last_char.isalpha()) and (last_char < '\x80')):
            last_char = '    '
        filtered.extend(last_char)
    return filtered
