def ensure_encoded(thing, encoding='utf-8'):
    """Ensures proper encoding for unicode characters.

    Currently used only for characters `✓` and `✗`.

    """
    if isinstance(thing, bytes) or not isinstance(thing, str):
        return thing
    else:
        return thing.encode(encoding)
