Click or drag to resize

LiteEncoderDecodeUnicode Method

Gets a string from a Unicode encoded buffer range. We have to honour an LE BOM, a BE BOM or no BOM at all for backwards compatibility.

Namespace: Orthogonal.NTagLite
Assembly: Orthogonal.NTagLite (in Orthogonal.NTagLite.dll) Version: 3.0.4
Syntax
C#
public static string DecodeUnicode(
	byte[] data,
	int offset,
	int length
)

Parameters

data  Byte

[Missing <param name="data"/> documentation for "M:Orthogonal.NTagLite.LiteEncoder.DecodeUnicode(System.Byte[],System.Int32,System.Int32)"]

offset  Int32

[Missing <param name="offset"/> documentation for "M:Orthogonal.NTagLite.LiteEncoder.DecodeUnicode(System.Byte[],System.Int32,System.Int32)"]

length  Int32

[Missing <param name="length"/> documentation for "M:Orthogonal.NTagLite.LiteEncoder.DecodeUnicode(System.Byte[],System.Int32,System.Int32)"]

Return Value

String

[Missing <returns> documentation for "M:Orthogonal.NTagLite.LiteEncoder.DecodeUnicode(System.Byte[],System.Int32,System.Int32)"]

Remarks
For a while a StreamReader was used to decode the Unicode buffer because it's 'smart' and handles all combinations of BOMs and endianess correctly, but it's to heavyweight for intensive use and was replaced with manual detection in the hope (wthout proof) that it's more efficient.
See Also