| Top |
| const TeplEncoding * | tepl_encoding_iconv_to_base_type () |
| TeplEncodingIconv * | tepl_encoding_iconv_new () |
| TeplEncodingIconv * | tepl_encoding_iconv_new_utf8 () |
| TeplEncodingIconv * | tepl_encoding_iconv_new_from_locale () |
| TeplEncodingIconv * | tepl_encoding_iconv_copy () |
| void | tepl_encoding_iconv_free () |
| gchar * | tepl_encoding_iconv_to_string () |
| gboolean | tepl_encoding_iconv_is_utf8 () |
| gboolean | tepl_encoding_iconv_equals () |
| GSList * | tepl_encoding_iconv_get_all () |
| GSList * | tepl_encoding_iconv_get_default_candidates () |
const TeplEncoding *
tepl_encoding_iconv_to_base_type (const TeplEncodingIconv *enc);
Since: 6.4
TeplEncodingIconv *
tepl_encoding_iconv_new (const gchar *charset);
Creates a new TeplEncodingIconv from a character set such as "UTF-8" or "ISO-8859-1".
The tepl_encoding_get_name() function will return exactly the same string as
the charset
passed in to this constructor.
[skip]
Since: 6.4
TeplEncodingIconv *
tepl_encoding_iconv_new_utf8 (void);
Creates a new TeplEncodingIconv with the "UTF-8" character set.
[skip]
Since: 6.4
TeplEncodingIconv *
tepl_encoding_iconv_new_from_locale (void);
Creates a new TeplEncodingIconv from the current locale, as returned by
g_get_charset().
[skip]
Since: 6.4
TeplEncodingIconv *
tepl_encoding_iconv_copy (const TeplEncodingIconv *enc);
[skip]
Since: 6.4
gchar *
tepl_encoding_iconv_to_string (const TeplEncodingIconv *enc);
Returns the encoding category name with the charset in parenthesis, for example "Unicode (UTF-8)". If the category name is unknown, just the charset is returned.
The category name is localized (i.e., already translated).
Since: 6.4
gboolean
tepl_encoding_iconv_is_utf8 (const TeplEncodingIconv *enc);
Returns whether enc
is a UTF-8 encoding.
If enc
was created with tepl_encoding_iconv_new_utf8(), the charset is
"UTF-8". But iconv supports other variants: "UTF8", "utf-8" and "utf8". This
function returns TRUE for all UTF-8 variants supported by iconv.
Since: 6.4
gboolean tepl_encoding_iconv_equals (const TeplEncodingIconv *enc1,const TeplEncodingIconv *enc2);
Returns whether enc1
and enc2
are equal. It returns TRUE iff:
Both enc1
and enc2
are NULL;
Or both enc1
and enc2
have a UTF-8 charset (see
tepl_encoding_iconv_is_utf8());
Or the charsets are equal according to g_ascii_strcasecmp() (because
iconv-compatible charsets are case insensitive).
enc1 |
a TeplEncodingIconv, or |
[nullable] |
enc2 |
a TeplEncodingIconv, or |
[nullable] |
Since: 6.4
GSList *
tepl_encoding_iconv_get_all (void);
Gets a list of all encodings known by TeplEncodingIconv.
Since: 6.4
GSList *
tepl_encoding_iconv_get_default_candidates
(void);
Gets the list of default candidate encodings to try when loading a file. See
gtk_source_file_loader_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.
Note that the returned list doesn't contain all encodings known by TeplEncodingIconv, it is a limited list that contains only the encodings that have the most likelihood to fit for the current locale.
Since: 6.4