Gjsify LogoGjsify Logo

Hierarchy

  • Encoding

Index

Constructors

  • Creates a new #TeplEncoding from a character set such as "UTF-8" or "ISO-8859-1".

    The tepl_encoding_get_charset() function will return exactly the same string as the charset passed in to this constructor.

    Parameters

    • charset: string

      a character set.

    Returns Tepl.Encoding

Properties

name: string

Methods

  • 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_is_utf8());
    • Or the charsets are equal according to g_ascii_strcasecmp() (because iconv-compatible charsets are case insensitive).

    Parameters

    Returns boolean

  • free(): void
  • get_charset(): string
  • get_name(): string
  • Gets the name of the #TeplEncoding such as "Unicode" or "Western". If the charset is unknown by #TeplEncoding, "Unknown" is returned. The return value is already translated by gettext.

    Returns string

  • is_utf8(): boolean
  • Returns whether enc is a UTF-8 encoding.

    If enc was created with tepl_encoding_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.

    Returns boolean

  • to_string(): string
  • Returns the encoding name with the charset in parenthesis, for example "Unicode (UTF-8)". If the name is unknown, just the charset is returned. The name is translated by gettext.

    Returns string

  • 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 #TeplEncoding, it is a limited list that contains only the encodings that have the most likelihood to fit for the current locale.

    Returns Tepl.Encoding[]

  • Creates a new #TeplEncoding from a character set such as "UTF-8" or "ISO-8859-1".

    The tepl_encoding_get_charset() function will return exactly the same string as the charset passed in to this constructor.

    Parameters

    • charset: string

      a character set.

    Returns Tepl.Encoding

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method