Encoding

Overview

Class to deal with conversions to/from different character encodings

Location

  • Reference:
    • Elements.dll  .NET, .NET Core 6.0, .NET Standard 2.0
    • elements.jar  Cooper
    • Elements.fx  Island, ToffeeV2
    • libElements.fx  Toffee
  • Namespace: RemObjects.Elements.RTL
  • Platforms: .NET, .NET Core 6.0, .NET Standard 2.0, Cooper, Island, Toffee, ToffeeV2
  • Mapped to:
    • Encoding  .NET, .NET Core 6.0, .NET Standard 2.0
    • Charset  Cooper
    • Encoding  Island
    • NSNumber  Toffee, ToffeeV2

 

ASCII

ASCII encoding instance.

 

class property ASCII: not nullable Encoding read;

 

class Encoding! ASCII { get; }

 

static var ASCII: Encoding { get{} }

 

class Encoding ASCII { __get; }

 

Shared ReadOnly Property ASCII() As Encoding

AsNSStringEncoding Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Toffee, ToffeeV2

 

method AsNSStringEncoding: NSStringEncoding

 

NSStringEncoding AsNSStringEncoding()

 

func AsNSStringEncoding() -> NSStringEncoding

 

Function AsNSStringEncoding() As NSStringEncoding

Default

The system default encoding. This is the encoding files are expected to be in, if they have no other encoding.

 

class property Default: not nullable Encoding read;

 

class Encoding! Default { get; }

 

static var Default: Encoding { get{} }

 

class Encoding Default { __get; }

 

Shared ReadOnly Property Default() As Encoding

DetectFromBytes (array of Byte): nullable Encoding

 

class method DetectFromBytes(aBytes: array of Byte): nullable Encoding

 

static Encoding? DetectFromBytes(Byte[] aBytes)

 

// Toffee
static func DetectFromBytes(_ aBytes: Byte...) -> Encoding
// ToffeeV2
static func DetectFromBytes(_ aBytes: Byte...) -> Encoding?

 

static Encoding DetectFromBytes(Byte[] aBytes)

 

Shared Function DetectFromBytes(aBytes As Byte()) As Encoding?

Parameters:

  • aBytes:

DetectFromBytes (array of Byte, Int32): nullable Encoding

 

class method DetectFromBytes(aBytes: array of Byte; out aSkipBytes: Int32): nullable Encoding

 

static Encoding? DetectFromBytes(Byte[] aBytes, out Int32 aSkipBytes)

 

// Toffee
static func DetectFromBytes(_ aBytes: Byte..., _ aSkipBytes: Int32) -> Encoding
// ToffeeV2
static func DetectFromBytes(_ aBytes: Byte..., _ aSkipBytes: Int32) -> Encoding?

 

static Encoding DetectFromBytes(Byte[] aBytes, __out Integer aSkipBytes)

 

Shared Function DetectFromBytes(aBytes As Byte(), <OutAttribute> ByRef aSkipBytes As Int32) As Encoding?

Parameters:

  • aBytes:
  • aSkipBytes:

GetBytes (String) includeBOM(Boolean): not nullable array of Byte Cooper, Island, Toffee, ToffeeV2

Get the bytes data from a string, if includeBOM is true, it includes the byte order marker if relevant for this encoding.

 

method GetBytes(aValue: String) includeBOM(aIncludeBOM: Boolean): not nullable array of Byte

 

Byte[]! GetBytes(String aValue) includeBOM(Boolean aIncludeBOM)

 

func GetBytes(_ aValue: String, includeBOM aIncludeBOM: Boolean) -> Byte...

 

Byte[] GetBytes(String aValue) includeBOM(Boolean aIncludeBOM)

 

Function GetBytes(aValue As String) includeBOM(aIncludeBOM As Boolean) As Byte()

Parameters:

  • aValue:
  • aIncludeBOM:

GetBytes (String): not nullable array of Byte

Get the bytes data from a string, including byte order marker.

 

method GetBytes(aValue: String): not nullable array of Byte

 

Byte[]! GetBytes(String aValue)

 

func GetBytes(_ aValue: String) -> Byte...

 

Byte[] GetBytes(String aValue)

 

Function GetBytes(aValue As String) As Byte()

Parameters:

  • aValue:

GetBytes (String) includeBOM(Boolean): not nullable array of Byte .NET, .NET Core 6.0, .NET Standard 2.0

 

method GetBytes(aValue: String) includeBOM(aIncludeBOM: Boolean): not nullable array of Byte

 

Byte[]! GetBytes(String aValue) includeBOM(Boolean aIncludeBOM)

 

func GetBytes(_ aValue: String, includeBOM aIncludeBOM: Boolean) -> Byte...

 

Function GetBytes(aValue As String) includeBOM(aIncludeBOM As Boolean) As Byte()

Parameters:

  • aValue:
  • aIncludeBOM:

GetEncoding

Get an encoding by it's name. System/platform dependent.

 

class method GetEncoding(aName: not nullable String): nullable Encoding

 

static Encoding? GetEncoding(String! aName)

 

// Toffee
static func GetEncoding(_ aName: String) -> Encoding
// ToffeeV2
static func GetEncoding(_ aName: String) -> Encoding?

 

static Encoding GetEncoding(String aName)

 

Shared Function GetEncoding(aName As String) As Encoding?

Parameters:

  • aName:

GetString (not nullable array of Byte): String Cooper, Island, Toffee, ToffeeV2

Convert a byte array back to string, in the given encoding.

 

method GetString(aValue: nullable array of Byte): String

 

String GetString(Byte[]? aValue)

 

// Toffee
func GetString(_ aValue: Byte...) -> String
// ToffeeV2
func GetString(_ aValue: Byte...?) -> String

 

String GetString(Byte[] aValue)

 

Function GetString(aValue As Byte()?) As String

Parameters:

  • aValue:

GetString (nullable array of Byte, Int32): String Island, Toffee, ToffeeV2

 

method GetString(aValue: nullable array of Byte; aOffset: Int32): String

 

String GetString(Byte[]? aValue, Int32 aOffset)

 

// Toffee
func GetString(_ aValue: Byte..., _ aOffset: Int32) -> String
// ToffeeV2
func GetString(_ aValue: Byte...?, _ aOffset: Int32) -> String

 

Function GetString(aValue As Byte()?, aOffset As Int32) As String

Parameters:

  • aValue:
  • aOffset:

GetString (not nullable array of Byte, Integer, Integer): String Cooper, Island, Toffee, ToffeeV2

Convert a byte array back to string, in the given encoding.

 

method GetString(aValue: nullable array of Byte; aOffset: Int32; aCount: Int32): String

 

String GetString(Byte[]? aValue, Int32 aOffset, Int32 aCount)

 

// Toffee
func GetString(_ aValue: Byte..., _ aOffset: Int32, _ aCount: Int32) -> String
// ToffeeV2
func GetString(_ aValue: Byte...?, _ aOffset: Int32, _ aCount: Int32) -> String

 

String GetString(Byte[] aValue, Integer aOffset, Integer aCount)

 

Function GetString(aValue As Byte()?, aOffset As Int32, aCount As Int32) As String

Parameters:

  • aValue:
  • aOffset:
  • aCount:

GetString (not nullable NSData): String Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator

Convert a byte array back to string, in the given encoding.

 

method GetString(aValue: not nullable NSData): String

 

String GetString(NSData! aValue)

 

func GetString(_ aValue: NSData) -> String

 

Function GetString(aValue As NSData) As String

Parameters:

  • aValue:

GetString (not nullable ImmutableBinary): String Cooper, Island, Toffee, ToffeeV2

Convert a byte array back to string, in the given encoding.

 

method GetString(aValue: not nullable ImmutableBinary): String

 

String GetString(ImmutableBinary! aValue)

 

func GetString(_ aValue: ImmutableBinary) -> String

 

String GetString(ImmutableBinary aValue)

 

Function GetString(aValue As ImmutableBinary) As String

Parameters:

  • aValue:

GetString (nullable array of Byte, Int32): String .NET, .NET Core 6.0, .NET Standard 2.0

 

method GetString(aValue: nullable array of Byte; aOffset: Int32): String

 

String GetString(Byte[]? aValue, Int32 aOffset)

 

func GetString(_ aValue: Byte...?, _ aOffset: Int32) -> String

 

Function GetString(aValue As Byte()?, aOffset As Int32) As String

Parameters:

  • aValue:
  • aOffset:

GetString (nullable array of Byte, Int32, Int32): String .NET, .NET Core 6.0, .NET Standard 2.0

 

method GetString(aValue: nullable array of Byte; aOffset: Int32; aCount: Int32): String

 

String GetString(Byte[]? aValue, Int32 aOffset, Int32 aCount)

 

func GetString(_ aValue: Byte...?, _ aOffset: Int32, _ aCount: Int32) -> String

 

Function GetString(aValue As Byte()?, aOffset As Int32, aCount As Int32) As String

Parameters:

  • aValue:
  • aOffset:
  • aCount:

GetString (not nullable ImmutableBinary): String .NET, .NET Core 6.0, .NET Standard 2.0

 

method GetString(aValue: not nullable ImmutableBinary): String

 

String GetString(ImmutableBinary! aValue)

 

func GetString(_ aValue: ImmutableBinary) -> String

 

Function GetString(aValue As ImmutableBinary) As String

Parameters:

  • aValue:

isUTF16BE

 

property isUTF16BE: Boolean read;

 

Boolean isUTF16BE { get; }

 

var isUTF16BE: Boolean { get{} }

 

Boolean isUTF16BE { __get; }

 

ReadOnly Property isUTF16BE() As Boolean

isUTF16LE

 

property isUTF16LE: Boolean read;

 

Boolean isUTF16LE { get; }

 

var isUTF16LE: Boolean { get{} }

 

Boolean isUTF16LE { __get; }

 

ReadOnly Property isUTF16LE() As Boolean

isUTF32BE

 

property isUTF32BE: Boolean read;

 

Boolean isUTF32BE { get; }

 

var isUTF32BE: Boolean { get{} }

 

Boolean isUTF32BE { __get; }

 

ReadOnly Property isUTF32BE() As Boolean

isUTF32LE

 

property isUTF32LE: Boolean read;

 

Boolean isUTF32LE { get; }

 

var isUTF32LE: Boolean { get{} }

 

Boolean isUTF32LE { __get; }

 

ReadOnly Property isUTF32LE() As Boolean

isUTF8

True if this encoding is utf8.

 

property isUTF8: Boolean read;

 

Boolean isUTF8 { get; }

 

var isUTF8: Boolean { get{} }

 

Boolean isUTF8 { __get; }

 

ReadOnly Property isUTF8() As Boolean

Name

Name of the encoding.

 

property Name: not nullable String read;

 

String! Name { get; }

 

var Name: String { get{} }

 

String Name { __get; }

 

ReadOnly Property Name() As String

UTF16BE

UTF16 in big endian order (note: this is fairly rare compared to little endian)

 

class property UTF16BE: not nullable Encoding read;

 

class Encoding! UTF16BE { get; }

 

static var UTF16BE: Encoding { get{} }

 

class Encoding UTF16BE { __get; }

 

Shared ReadOnly Property UTF16BE() As Encoding

UTF16LE

UTF16 in little endian order

 

class property UTF16LE: not nullable Encoding read;

 

class Encoding! UTF16LE { get; }

 

static var UTF16LE: Encoding { get{} }

 

class Encoding UTF16LE { __get; }

 

Shared ReadOnly Property UTF16LE() As Encoding

UTF32BE

UTF32 in big endian order (note: this is fairly rare compared to little endian)

 

class property UTF32BE: not nullable Encoding read;

 

class Encoding! UTF32BE { get; }

 

static var UTF32BE: Encoding { get{} }

 

class Encoding UTF32BE { __get; }

 

Shared ReadOnly Property UTF32BE() As Encoding

UTF32LE

UTF32 in little endian order

 

class property UTF32LE: not nullable Encoding read;

 

class Encoding! UTF32LE { get; }

 

static var UTF32LE: Encoding { get{} }

 

class Encoding UTF32LE { __get; }

 

Shared ReadOnly Property UTF32LE() As Encoding

UTF8

UTF8 Encoding.

 

class property UTF8: not nullable Encoding read;

 

class Encoding! UTF8 { get; }

 

static var UTF8: Encoding { get{} }

 

class Encoding UTF8 { __get; }

 

Shared ReadOnly Property UTF8() As Encoding

 

isUTF16BE

 

property isUTF16BE: Boolean read;

 

Boolean isUTF16BE { get; }

 

var isUTF16BE: Boolean { get{} }

 

Boolean isUTF16BE { __get; }

 

ReadOnly Property isUTF16BE() As Boolean

isUTF16LE

 

property isUTF16LE: Boolean read;

 

Boolean isUTF16LE { get; }

 

var isUTF16LE: Boolean { get{} }

 

Boolean isUTF16LE { __get; }

 

ReadOnly Property isUTF16LE() As Boolean

isUTF32BE

 

property isUTF32BE: Boolean read;

 

Boolean isUTF32BE { get; }

 

var isUTF32BE: Boolean { get{} }

 

Boolean isUTF32BE { __get; }

 

ReadOnly Property isUTF32BE() As Boolean

isUTF32LE

 

property isUTF32LE: Boolean read;

 

Boolean isUTF32LE { get; }

 

var isUTF32LE: Boolean { get{} }

 

Boolean isUTF32LE { __get; }

 

ReadOnly Property isUTF32LE() As Boolean

isUTF8

True if this encoding is utf8.

 

property isUTF8: Boolean read;

 

Boolean isUTF8 { get; }

 

var isUTF8: Boolean { get{} }

 

Boolean isUTF8 { __get; }

 

ReadOnly Property isUTF8() As Boolean

Name

Name of the encoding.

 

property Name: not nullable String read;

 

String! Name { get; }

 

var Name: String { get{} }

 

String Name { __get; }

 

ReadOnly Property Name() As String

ASCII

ASCII encoding instance.

 

class property ASCII: not nullable Encoding read;

 

class Encoding! ASCII { get; }

 

static var ASCII: Encoding { get{} }

 

class Encoding ASCII { __get; }

 

Shared ReadOnly Property ASCII() As Encoding

Default

The system default encoding. This is the encoding files are expected to be in, if they have no other encoding.

 

class property Default: not nullable Encoding read;

 

class Encoding! Default { get; }

 

static var Default: Encoding { get{} }

 

class Encoding Default { __get; }

 

Shared ReadOnly Property Default() As Encoding

UTF16BE

UTF16 in big endian order (note: this is fairly rare compared to little endian)

 

class property UTF16BE: not nullable Encoding read;

 

class Encoding! UTF16BE { get; }

 

static var UTF16BE: Encoding { get{} }

 

class Encoding UTF16BE { __get; }

 

Shared ReadOnly Property UTF16BE() As Encoding

UTF16LE

UTF16 in little endian order

 

class property UTF16LE: not nullable Encoding read;

 

class Encoding! UTF16LE { get; }

 

static var UTF16LE: Encoding { get{} }

 

class Encoding UTF16LE { __get; }

 

Shared ReadOnly Property UTF16LE() As Encoding

UTF32BE

UTF32 in big endian order (note: this is fairly rare compared to little endian)

 

class property UTF32BE: not nullable Encoding read;

 

class Encoding! UTF32BE { get; }

 

static var UTF32BE: Encoding { get{} }

 

class Encoding UTF32BE { __get; }

 

Shared ReadOnly Property UTF32BE() As Encoding

UTF32LE

UTF32 in little endian order

 

class property UTF32LE: not nullable Encoding read;

 

class Encoding! UTF32LE { get; }

 

static var UTF32LE: Encoding { get{} }

 

class Encoding UTF32LE { __get; }

 

Shared ReadOnly Property UTF32LE() As Encoding

UTF8

UTF8 Encoding.

 

class property UTF8: not nullable Encoding read;

 

class Encoding! UTF8 { get; }

 

static var UTF8: Encoding { get{} }

 

class Encoding UTF8 { __get; }

 

Shared ReadOnly Property UTF8() As Encoding

 

DetectFromBytes (array of Byte): nullable Encoding

 

class method DetectFromBytes(aBytes: array of Byte): nullable Encoding

 

static Encoding? DetectFromBytes(Byte[] aBytes)

 

// Toffee
static func DetectFromBytes(_ aBytes: Byte...) -> Encoding
// ToffeeV2
static func DetectFromBytes(_ aBytes: Byte...) -> Encoding?

 

static Encoding DetectFromBytes(Byte[] aBytes)

 

Shared Function DetectFromBytes(aBytes As Byte()) As Encoding?

Parameters:

  • aBytes:

DetectFromBytes (array of Byte, Int32): nullable Encoding

 

class method DetectFromBytes(aBytes: array of Byte; out aSkipBytes: Int32): nullable Encoding

 

static Encoding? DetectFromBytes(Byte[] aBytes, out Int32 aSkipBytes)

 

// Toffee
static func DetectFromBytes(_ aBytes: Byte..., _ aSkipBytes: Int32) -> Encoding
// ToffeeV2
static func DetectFromBytes(_ aBytes: Byte..., _ aSkipBytes: Int32) -> Encoding?

 

static Encoding DetectFromBytes(Byte[] aBytes, __out Integer aSkipBytes)

 

Shared Function DetectFromBytes(aBytes As Byte(), <OutAttribute> ByRef aSkipBytes As Int32) As Encoding?

Parameters:

  • aBytes:
  • aSkipBytes:

GetEncoding

Get an encoding by it's name. System/platform dependent.

 

class method GetEncoding(aName: not nullable String): nullable Encoding

 

static Encoding? GetEncoding(String! aName)

 

// Toffee
static func GetEncoding(_ aName: String) -> Encoding
// ToffeeV2
static func GetEncoding(_ aName: String) -> Encoding?

 

static Encoding GetEncoding(String aName)

 

Shared Function GetEncoding(aName As String) As Encoding?

Parameters:

  • aName:

 

AsNSStringEncoding Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Toffee, ToffeeV2

 

method AsNSStringEncoding: NSStringEncoding

 

NSStringEncoding AsNSStringEncoding()

 

func AsNSStringEncoding() -> NSStringEncoding

 

Function AsNSStringEncoding() As NSStringEncoding

GetBytes (String) includeBOM(Boolean): not nullable array of Byte Cooper, Island, Toffee, ToffeeV2

Get the bytes data from a string, if includeBOM is true, it includes the byte order marker if relevant for this encoding.

 

method GetBytes(aValue: String) includeBOM(aIncludeBOM: Boolean): not nullable array of Byte

 

Byte[]! GetBytes(String aValue) includeBOM(Boolean aIncludeBOM)

 

func GetBytes(_ aValue: String, includeBOM aIncludeBOM: Boolean) -> Byte...

 

Byte[] GetBytes(String aValue) includeBOM(Boolean aIncludeBOM)

 

Function GetBytes(aValue As String) includeBOM(aIncludeBOM As Boolean) As Byte()

Parameters:

  • aValue:
  • aIncludeBOM:

GetBytes (String): not nullable array of Byte

Get the bytes data from a string, including byte order marker.

 

method GetBytes(aValue: String): not nullable array of Byte

 

Byte[]! GetBytes(String aValue)

 

func GetBytes(_ aValue: String) -> Byte...

 

Byte[] GetBytes(String aValue)

 

Function GetBytes(aValue As String) As Byte()

Parameters:

  • aValue:

GetString (not nullable array of Byte): String Cooper, Island, Toffee, ToffeeV2

Convert a byte array back to string, in the given encoding.

 

method GetString(aValue: nullable array of Byte): String

 

String GetString(Byte[]? aValue)

 

// Toffee
func GetString(_ aValue: Byte...) -> String
// ToffeeV2
func GetString(_ aValue: Byte...?) -> String

 

String GetString(Byte[] aValue)

 

Function GetString(aValue As Byte()?) As String

Parameters:

  • aValue:

GetString (nullable array of Byte, Int32): String Island, Toffee, ToffeeV2

 

method GetString(aValue: nullable array of Byte; aOffset: Int32): String

 

String GetString(Byte[]? aValue, Int32 aOffset)

 

// Toffee
func GetString(_ aValue: Byte..., _ aOffset: Int32) -> String
// ToffeeV2
func GetString(_ aValue: Byte...?, _ aOffset: Int32) -> String

 

Function GetString(aValue As Byte()?, aOffset As Int32) As String

Parameters:

  • aValue:
  • aOffset:

GetString (not nullable array of Byte, Integer, Integer): String Cooper, Island, Toffee, ToffeeV2

Convert a byte array back to string, in the given encoding.

 

method GetString(aValue: nullable array of Byte; aOffset: Int32; aCount: Int32): String

 

String GetString(Byte[]? aValue, Int32 aOffset, Int32 aCount)

 

// Toffee
func GetString(_ aValue: Byte..., _ aOffset: Int32, _ aCount: Int32) -> String
// ToffeeV2
func GetString(_ aValue: Byte...?, _ aOffset: Int32, _ aCount: Int32) -> String

 

String GetString(Byte[] aValue, Integer aOffset, Integer aCount)

 

Function GetString(aValue As Byte()?, aOffset As Int32, aCount As Int32) As String

Parameters:

  • aValue:
  • aOffset:
  • aCount:

GetString (not nullable NSData): String Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator

Convert a byte array back to string, in the given encoding.

 

method GetString(aValue: not nullable NSData): String

 

String GetString(NSData! aValue)

 

func GetString(_ aValue: NSData) -> String

 

Function GetString(aValue As NSData) As String

Parameters:

  • aValue:

GetString (not nullable ImmutableBinary): String Cooper, Island, Toffee, ToffeeV2

Convert a byte array back to string, in the given encoding.

 

method GetString(aValue: not nullable ImmutableBinary): String

 

String GetString(ImmutableBinary! aValue)

 

func GetString(_ aValue: ImmutableBinary) -> String

 

String GetString(ImmutableBinary aValue)

 

Function GetString(aValue As ImmutableBinary) As String

Parameters:

  • aValue:

GetBytes (String) includeBOM(Boolean): not nullable array of Byte .NET, .NET Core 6.0, .NET Standard 2.0

 

method GetBytes(aValue: String) includeBOM(aIncludeBOM: Boolean): not nullable array of Byte

 

Byte[]! GetBytes(String aValue) includeBOM(Boolean aIncludeBOM)

 

func GetBytes(_ aValue: String, includeBOM aIncludeBOM: Boolean) -> Byte...

 

Function GetBytes(aValue As String) includeBOM(aIncludeBOM As Boolean) As Byte()

Parameters:

  • aValue:
  • aIncludeBOM:

GetString (nullable array of Byte, Int32): String .NET, .NET Core 6.0, .NET Standard 2.0

 

method GetString(aValue: nullable array of Byte; aOffset: Int32): String

 

String GetString(Byte[]? aValue, Int32 aOffset)

 

func GetString(_ aValue: Byte...?, _ aOffset: Int32) -> String

 

Function GetString(aValue As Byte()?, aOffset As Int32) As String

Parameters:

  • aValue:
  • aOffset:

GetString (nullable array of Byte, Int32, Int32): String .NET, .NET Core 6.0, .NET Standard 2.0

 

method GetString(aValue: nullable array of Byte; aOffset: Int32; aCount: Int32): String

 

String GetString(Byte[]? aValue, Int32 aOffset, Int32 aCount)

 

func GetString(_ aValue: Byte...?, _ aOffset: Int32, _ aCount: Int32) -> String

 

Function GetString(aValue As Byte()?, aOffset As Int32, aCount As Int32) As String

Parameters:

  • aValue:
  • aOffset:
  • aCount:

GetString (not nullable ImmutableBinary): String .NET, .NET Core 6.0, .NET Standard 2.0

 

method GetString(aValue: not nullable ImmutableBinary): String

 

String GetString(ImmutableBinary! aValue)

 

func GetString(_ aValue: ImmutableBinary) -> String

 

Function GetString(aValue As ImmutableBinary) As String

Parameters:

  • aValue: