type
Charset
@Serializable { simple=true }
const class Charset : Obj
Charset represents a specific character encoding. It is used to decode bytes to Unicode characters, and encode Unicode characters to bytes.
constructors
fromStr |
Attempt to lookup a Charset by name. |
---|
methods
defVal |
Default value is |
---|---|
equals |
Charset equality is based on the character set name ignoring case (names are not case-sensitive). |
hash |
Compute hash code based on case-insensitive name. |
name |
Get the name of this character encoding. |
toStr |
Return name(). |
utf16BE |
An charset for "UTF-16BE" format (Sixteen-bit UCS Transformation Format, big-endian byte order). |
utf16LE |
An charset for "UTF-16LE" format (Sixteen-bit UCS Transformation Format, little-endian byte order). |
utf8 |
An charset for "UTF-8" format (Eight-bit UCS Transformation Format). |
Slot Details
defVal
equals
fromStr
hash
virtual override Int hash()
Compute hash code based on case-insensitive name.
name
Str name()
Get the name of this character encoding.
toStr
virtual override Str toStr()
Return name().
utf16BE
static Charset utf16BE()
An charset for "UTF-16BE" format (Sixteen-bit UCS Transformation Format, big-endian byte order).
utf16LE
static Charset utf16LE()
An charset for "UTF-16LE" format (Sixteen-bit UCS Transformation Format, little-endian byte order).
utf8
static Charset utf8()
An charset for "UTF-8" format (Eight-bit UCS Transformation Format).