## TeplEncoding TeplEncoding — Character encoding interface |

## Functions

const gchar * | tepl_encoding_get_name ()
const gchar * | tepl_encoding_get_category_name ()

## Types and Values

struct | TeplEncoding
struct | TeplEncodingVtable

## Includes

    #include <tepl/tepl.h>

## Description

TeplEncoding is an interface to represent a character encoding, also called a "character set" or "charset".

It serves as a basis for features such as character encoding detection and conversion during file loading and saving.

Note that the text in GTK widgets is always encoded in UTF-8.

## Functions

### tepl_encoding_get_name ()

    const gchar *
    tepl_encoding_get_name (const TeplEncoding *enc);

Gets the name of the TeplEncoding, such as "UTF-8".

#### Parameters

enc | a TeplEncoding. |

#### Returns

the name of the TeplEncoding.

Since: 6.4

### tepl_encoding_get_category_name ()

    const gchar *
    tepl_encoding_get_category_name (const TeplEncoding *enc);

TeplEncoding's are grouped into several categories, such as "Unicode" or "Western".

This function returns the category name of the TeplEncoding, or `NULL` if the category is unknown.

The returned string is localized (i.e., already translated).

#### Parameters

enc | a TeplEncoding. |

#### Returns

the category name of the TeplEncoding, or `NULL`.

[nullable]

Since: 6.4

## Types and Values

### struct TeplEncoding

    struct TeplEncoding {
    	TeplEncodingVtable *vtable;
    };

To implement the TeplEncoding interface.

Don't access the fields of this struct unless you are writing a class that implements this interface.

#### Members

TeplEncodingVtable *`vtable`; | the TeplEncodingVtable of the object. |

Since: 6.4

### struct TeplEncodingVtable

    struct TeplEncodingVtable {
    	const gchar * (* get_name)		(const TeplEncoding *enc);

    	const gchar * (* get_category_name) (const TeplEncoding *enc);
    };

The virtual function table of the TeplEncoding interface.

#### Members

`get_name` () | For `tepl_encoding_get_name()`. |
`get_category_name` () | For `tepl_encoding_get_category_name()`. |

Since: 6.4