GMimeFilterWindows

GMimeFilterWindows — Determine if text is in a Microsoft Windows codepage

Synopsis

struct              GMimeFilterWindows;
GMimeFilter *       g_mime_filter_windows_new           (const char *claimed_charset);
gboolean            g_mime_filter_windows_is_windows_charset
                                                        (GMimeFilterWindows *filter);
const char *        g_mime_filter_windows_real_charset  (GMimeFilterWindows *filter);

Description

A GMimeFilter used for determining if text marked as iso-8859-## is actually encoded in one of the Windows-CP125# charsets.

Details

struct GMimeFilterWindows

struct GMimeFilterWindows {
	GMimeFilter parent_object;
	
	gboolean is_windows;
	char *claimed_charset;
};

A filter for detecting whether or not a text stream claimed to be iso-8859-X is really that charset or if it is really a Windows-CP125x charset.

GMimeFilter parent_object;

parent GMimeFilter

gboolean is_windows;

TRUE if the stream is detected to be a windows-cp125x charset

char *claimed_charset;

charset the text stream is claimed to be

g_mime_filter_windows_new ()

GMimeFilter *       g_mime_filter_windows_new           (const char *claimed_charset);

Creates a new GMimeFilterWindows filter. When a stream of text has been filtered, it can be determined whether or not said text stream was in claimed_charset or the equivalent Windows-CP125# charset.

claimed_charset :

charset that a text stream claims to be

Returns :

a new windows filter.

g_mime_filter_windows_is_windows_charset ()

gboolean            g_mime_filter_windows_is_windows_charset
                                                        (GMimeFilterWindows *filter);

Determines whether or not a Windows-CP125# charset has been detected so far.

filter :

windows filter object

Returns :

TRUE if the filtered stream has been detected to contain Windows-CP125# characters or FALSE otherwise.

g_mime_filter_windows_real_charset ()

const char *        g_mime_filter_windows_real_charset  (GMimeFilterWindows *filter);

Figures out the real charset that the text is encoded in based on whether or not Windows-CP125# characters were found.

filter :

windows filter object

Returns :

a const string pointer to the claimed charset if filtered text stream was found not to contain any Windows-CP125# characters or the proper Windows-CP125# charset.

See Also

GMimeFilter