GMime.FilterWindows

g GMime.Filter GMime.Filter GMime.FilterWindows GMime.FilterWindows GMime.Filter->GMime.FilterWindows GObject.Object GObject.Object GObject.Object->GMime.Filter

Subclasses:

None

Methods

Inherited:

GMime.Filter (6), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (claimed_charset)

is_windows_charset ()

real_charset ()

Virtual Methods

Inherited:

GMime.Filter (4), GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

claimed_charset

str

r

charset the text stream is claimed to be

is_windows

bool

r

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

parent_object

GMime.Filter

r

parent GMime.Filter

Class Details

class GMime.FilterWindows(**kwargs)
Bases:

GMime.Filter

Abstract:

No

Structure:

GMime.FilterWindowsClass

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.

classmethod new(claimed_charset)
Parameters:

claimed_charset (str) – charset that a text stream claims to be

Returns:

a new windows filter.

Return type:

GMime.Filter

Creates a new GMime.FilterWindows 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.

is_windows_charset()
Returns:

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

Return type:

bool

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

real_charset()
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.

Return type:

str

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