Hierarchy

  • Encoding

Index

Constructors

constructor

  • new Encoding(name: string, codepage: number, webName?: string): Encoding
  • Parameters

    • name: string
    • codepage: number
    • Default value webName: string = null

    Returns Encoding

Properties

codepage

codepage: number

encodingName

encodingName: string

webName

webName: string = ""

Static ASCII

ASCII: Encoding = new Encoding("ASCII", Encoding.CodePageASCII, "US-ASCII")

Static BigEndianUnicode

BigEndianUnicode: Encoding = new Encoding("BigEndianUnicode", Encoding.CodePageBigEndian)

Static Default

Default: Encoding = new Encoding("UTF8", Encoding.CodePageUTF8, "utf-8")

Static ISO_8859_1

ISO_8859_1: Encoding = new Encoding("ISO-8859-1", Encoding.CodePageISO_8859_1, "iso-8859-1")

Static UTF32

UTF32: Encoding = new Encoding("UTF32", Encoding.CodePageUTF32, "utf-32")

Static UTF7

UTF7: Encoding = new Encoding("UTF7", Encoding.CodePageUTF7, "utf-7")

Static UTF8

UTF8: Encoding = new Encoding("UTF8", Encoding.CodePageUTF8, "utf-8")

Static Unicode

Unicode: Encoding = new Encoding("Unicode", Encoding.CodePageUnicode, "utf-16")

Static Windows1250

Windows1250: Encoding = new Encoding("Windows-1250", Encoding.CodePageWindows1250, "windows-1250")

Static Windows1251

Windows1251: Encoding = new Encoding("Windows-1251", Encoding.CodePageWindows1251, "windows-1251")

Static Windows1252

Windows1252: Encoding = new Encoding("Windows-1252", Encoding.CodePageWindows1252, "windows-1252")

Static Windows1256

Windows1256: Encoding = new Encoding("Windows-1256", Encoding.CodePageWindows1256, "windows-1256")

Methods

getBytes

  • getBytes(str: string): number[]
  • Parameters

    • str: string

    Returns number[]

getString

  • getString(bytes: number[] | Uint8Array): string
  • Parameters

    • bytes: number[] | Uint8Array

    Returns string

Static getEncoding

  • getEncoding(codepage: number): Encoding
  • Parameters

    • codepage: number

    Returns Encoding

Static getSupportedEncodings

  • getSupportedEncodings(): object[]
  • Returns object[]

Generated using TypeDoc