1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>GMime Stream Filters</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7 <link rel="home" href="index.html" title="GMime 2.6 Reference Manual">
8 <link rel="up" href="fundamentals.html" title="Part II. GMime Fundamentals">
9 <link rel="prev" href="gmime-streams.html" title="GMime Streams">
10 <link rel="next" href="gmime-data-wrappers.html" title="GMime Data Wrappers">
11 <meta name="generator" content="GTK-Doc V1.18 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
16 <td><a accesskey="p" href="gmime-streams.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
17 <td><a accesskey="u" href="fundamentals.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
18 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
19 <th width="100%" align="center">GMime 2.6 Reference Manual</th>
20 <td><a accesskey="n" href="gmime-data-wrappers.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
22 <div class="refentry">
23 <a name="gmime-filters"></a><div class="titlepage"></div>
24 <div class="refnamediv"><table width="100%"><tr>
26 <h2><span class="refentrytitle">GMime Stream Filters</span></h2>
27 <p>GMime Stream Filters — How to use GMime Stream Filters</p>
29 <td valign="top" align="right"></td>
31 <div class="refsect1">
32 <a name="filter-overview"></a><h2>Overview of Filters</h2>
33 <p>Stream filters are an efficient way of converting data from
34 one format to another. To use a stream filter, you must first
35 construct a GMimeStreamFilter stream and then add the desired
37 <p>GMime comes equipped with some basic filters such as
38 GMimeFilterBasic, GMimeFilterCharset, GMimeFilterCRLF,
39 GMimeFilterFrom and GMimeFilterHTML.</p>
40 <p>The GMimeFilterBasic filter is actually a collection of
41 filters for common transfer encodings used by MIME. So far, it is
42 able to handle encoding and decoding of base64, quoted-printable
44 <p>For internationalization support, GMime also includes a
45 filter for converting between any 2 charsets,
46 GMimeFilterCharset. With this filter, mail user agents can allow
47 the user to read the message content in his or her own
49 <p>A common conversion needed for text is CRLF -> LF and LF ->
50 CRLF which is needed for most (all?) internet protocols. Luckily,
51 GMime comes equipped with a filter to handle this for you,
52 GMimeFilterCRLF. You'll notice that GMimeFilterCRLF can also
53 handle dot-escaping, which is especially useful for SMTP
55 <p>On Unix systems, mail often resides in spools in mbox
56 format. Mbox uses a line that starts with "From " to delimit
57 messages which means that message bodies are forbidden to contain
58 lines starting with "From ". The common way to escape these from
59 lines in message bodies is to prepend the line with a greater-than
60 character ('>') producing ">From ". You'll find GMimeFilterFrom
61 handy when dealing with this.</p>
62 <p>The GMimeFilterHTML filter converts a normal text stream
63 into an html stream. This is especially useful if you are using a
64 widget such as GtkHTML to display the contents of an email
70 Generated by GTK-Doc V1.18</div>