def replace_smart_quotes(text: str, encoding: str='utf8') -> str:
    """Replaces smart single and double quotes with straight ones"""
    encoded = text.encode(encoding)
    for single in (b'\x98', b'\x99'):
            encoded = encoded.replace(b'\xe2\x80' + single, b'\'')
    for double in (b'\x93', b'\x94', b'\x9c', b'\x9d'):
            encoded = encoded.replace(b'\xe2\x80' + double, b'"')
    return encoded.decode(encoding)