import base64


def encode_data(non_encoded_data: str) -> str:
    """
    Encode a UTF-8 string.

    :param str non_encoded_data: The non encoded data.
    :return: encoded_data string
    """
    data = base64.b64encode(bytes(non_encoded_data, encoding='UTF-8'))
    data = data.decode(encoding='UTF-8')
    return data