def isprintable(string):
    """Return if all characters in string are printable.

    >>> isprintable('abc')
    True
    >>> isprintable(b'')
    False

    """
    string = string.strip()
    if not string:
        return True
    try:
        return string.isprintable()
    except Exception:
        pass
    try:
        return string.decode().isprintable()
    except Exception:
        pass
