Gjsify LogoGjsify Logo

State used by g_mime_charset_best() and g_mime_charset_best_name().

record

Hierarchy

  • Charset

Index

Constructors

Properties

level: number

charset level

field
mask: number

charset mask

field

Methods

  • bestName(): string
  • Gets the best charset name based on the charset mask charset.

    Returns string

  • canEncode(charset: string, text: string, len: number): boolean
  • Check to see if the UTF-8 text will fit safely within charset.

    Parameters

    • charset: string

      a charset

    • text: string

      utf-8 text to check

    • len: number

      length of text

    Returns boolean

  • init(): void
  • step(inbuf: string, inlen: number): void
  • Steps through the input buffer 1 unicode character (glyph) at a time (ie, not necessarily 1 byte at a time). Bitwise 'and' our charset->mask with the mask for each glyph. This has the effect of limiting what charsets our charset->mask can match.

    Parameters

    • inbuf: string

      input text buffer (must be in UTF-8)

    • inlen: number

      input buffer length

    Returns void

  • best(inbuf: string, inlen: number): string
  • Computes the best charset to use to encode this text buffer.

    Parameters

    • inbuf: string

      a UTF-8 text buffer

    • inlen: number

      input buffer length

    Returns string

  • canonName(charset: string): string
  • Attempts to find a canonical charset name for charset.

    Note: Will normally return the same value as g_mime_charset_iconv_name() unless the system iconv does not use the canonical ISO charset names (such as using ISO8859-1 rather than the canonical form ISO-8859-1).

    Parameters

    • charset: string

      charset name

    Returns string

  • iconvName(charset: string): string
  • Attempts to find an iconv-friendly charset name for charset.

    Parameters

    • charset: string

      charset name

    Returns string

  • isoToWindows(isocharset: string): string
  • Maps the ISO-8859-# charset to the equivalent Windows-CP125# charset.

    Parameters

    • isocharset: string

      ISO-8859-# charset

    Returns string

  • language(charset: string): string
  • Attempts to find a specific language code that is specific to charset. Currently only handles CJK and Russian/Ukranian charset->lang mapping. Everything else will return %NULL.

    Parameters

    • charset: string

      charset name

    Returns string

  • localeName(): string
  • Gets the user's locale charset (or iso-8859-1 by default).

    Note: This function is deprecated. Use g_mime_locale_charset() instead.

    Returns string

  • mapInit(): void
  • Initializes character set maps.

    Note: g_mime_init() calls this routine for you.

    Returns void

  • mapShutdown(): void
  • Frees internal lookup tables created in g_mime_charset_map_init().

    Returns void

  • name(charset: string): string
  • Attempts to find an iconv-friendly charset name for charset.

    Note: This function is deprecated. Use g_mime_charset_iconv_name() instead.

    Parameters

    • charset: string

      charset name

    Returns string

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