import codecs


def _convert_text_eb2asc(value_to_convert):
    """
    Converts a string from ebcdic to ascii

    :param value_to_convert: The ebcdic value to convert
    :return: converted ascii text
    """

    val = codecs.encode(codecs.decode(value_to_convert, "cp500"), "latin-1")
    return val