【问题标题】:C++ Decode quoted-printable encoding with GMime 3.0C++ 使用 GMime 3.0 解码带引号的可打印编码
【发布时间】:2017-10-25 09:44:26
【问题描述】:

我有一封由多个部分组成的电子邮件,我用 GMime 成功解析了它,但我不知道如何解码 Content-Transfer-Encoding:quoted-printable零件。

我看到有类似自动机的功能,但我不知道如何使用它们。

g_mime_encoding_init_decode()

g_mime_encoding_quoted_decode_step()

有人知道怎么做吗? 我的输入是一个包含消息的文本文件。

【问题讨论】:

    标签: c++ decode mime quoted-printable


    【解决方案1】:

    您不需要使用这些方法。您需要做的就是:

    content = g_mime_part_get_content (part);
    g_mime_data_wrapper_write_to_stream (content, output_stream);
    

    此时,output_stream 将包含解码后的内容。

    【讨论】:

      猜你喜欢
      • 2013-07-09
      • 2019-11-25
      • 2020-02-17
      • 2017-04-19
      • 2016-09-04
      • 2013-06-22
      • 2013-12-14
      • 1970-01-01
      • 2012-05-14
      相关资源
      最近更新 更多