def register_cp65001():
    """Register cp65001 so that PY2 knowns about it."""
    import codecs
    try:
        codecs.lookup('cp65001')
        return False
    except LookupError:
        codecs.register(lambda name: codecs.lookup('utf-8') if name ==
            'cp65001' else None)
        return True
