GtkSource.Encoding¶
Fields¶
None
Methods¶
class |
|
class |
|
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
Details¶
- class GtkSource.Encoding¶
Character encoding.
The
GtkSource.Encoding
boxed type represents a character encoding. It is used for example byGtkSource.File
. Note that the text in GTK widgets is always encoded in UTF-8.- classmethod get_all()¶
- Returns:
a list of all
GtkSource.Encoding
's. Free with g_slist_free().- Return type:
Gets all encodings.
- classmethod get_current()¶
- Returns:
the current locale encoding.
- Return type:
Gets the
GtkSource.Encoding
for the current locale.See also [func`GLib`.get_charset].
- classmethod get_default_candidates()¶
- Returns:
the list of default candidate encodings. Free with g_slist_free().
- Return type:
Gets the list of default candidate encodings to try when loading a file.
See [method`FileLoader`.set_candidate_encodings].
This function returns a different list depending on the current locale (i.e. language, country and default encoding). The UTF-8 encoding and the current locale encoding are guaranteed to be present in the returned list.
- classmethod get_from_charset(charset)¶
- Parameters:
charset (
str
) – a character set.- Returns:
the corresponding
GtkSource.Encoding
, orNone
if not found.- Return type:
Gets a
GtkSource.Encoding
from a character set such as “UTF-8” or “ISO-8859-1”.
- classmethod get_utf8()¶
- Returns:
the UTF-8 encoding.
- Return type:
- copy()¶
- Returns:
a copy of self.
- Return type:
Used by language bindings.
- free()¶
Used by language bindings.
- get_charset()¶
- Returns:
the character set of the
GtkSource.Encoding
.- Return type:
Gets the character set of the
GtkSource.Encoding
, such as “UTF-8” or “ISO-8859-1”.
- get_name()¶
- Returns:
the name of the
GtkSource.Encoding
.- Return type:
Gets the name of the
GtkSource.Encoding
such as “Unicode” or “Western”.