const class sys::Charset

sys::Obj
  sys::Charset

@Serializable { simple=true }

Source

Charset represents a specific character encoding. It is used to decode bytes to Unicode characters, and encode Unicode characters to bytes.

defVal

static Charset defVal()

Source

Default value is utf8.

equals

virtual override Bool equals(Obj? obj)

Source

Charset equality is based on the character set name ignoring case (names are not case-sensitive).

fromStr

static new fromStr(Str name, Bool checked := true)

Source

Attempt to lookup a Charset by name. Use one of the predefined methods such as utf8 to get a standard encoding. If charset not found and checked is false return null, otherwise throw ParseErr.

hash

virtual override Int hash()

Source

Compute hash code based on case-insensitive name.

name

Str name()

Source

Get the name of this character encoding.

toStr

virtual override Str toStr()

Source

Return name().

utf16BE

static Charset utf16BE()

Source

A charset for "UTF-16BE" format (Sixteen-bit UCS Transformation Format, big-endian byte order).

utf16LE

static Charset utf16LE()

Source

A charset for "UTF-16LE" format (Sixteen-bit UCS Transformation Format, little-endian byte order).

utf8

static Charset utf8()

Source

A charset for "UTF-8" format (Eight-bit UCS Transformation Format).