def METHOD_NAME(filename):
    '''
    给定一个消息文件, 读取其中的所有信息并返回一个字典
    '''
    with open(filename, 'rt', encoding=Common.get_file_encoding(filename)) as f:
        content = f.readlines()
    mes_dict = {}
    for line in content:
        fields = split_msg(line)
        if fields is None:
            continue
        if not fields[0].isdigit():
            continue
        mes_dict[int(fields[0])] = {
            'mes': fields[1],
            'fmt': get_format_specifier(fields[1])
        }
    return mes_dict