Table of Contents

Class ECIEncoderSet

Namespace
ZXing.Common
Assembly
zxing.dll

Set of CharsetEncoders for a given input string Invariants:

  • The list contains only encoders from CharacterSetECI(list is shorter then the list of encoders available on the platform for which ECI values are defined).
  • The list contains encoders at least one encoder for every character in the input.
  • The first encoder in the list is always the ISO-8859-1 encoder even of no character in the input can be encoded by it.
  • If the input contains a character that is not in ISO-8859-1 then the last two entries in the list will be the UTF-8 encoder and the UTF-16BE encoder.

@author Alex Geller

public class ECIEncoderSet
Inheritance
ECIEncoderSet
Inherited Members

Constructors

ECIEncoderSet(string, Encoding, int)

Constructs an encoder set

public ECIEncoderSet(string stringToEncode, Encoding priorityCharset, int fnc1)

Parameters

stringToEncode string

the string that needs to be encoded

priorityCharset Encoding

The preferred { @link Charset } or null.

fnc1 int

fnc1 denotes the character in the input that represents the FNC1 character or -1 for a non-GS1 bar code.When specified, it is considered an error to pass it as argument to the methods canEncode() or encode().

Properties

Length

public int Length { get; }

Property Value

int

Methods

Clone(Encoding)

public static Encoding Clone(Encoding encoding)

Parameters

encoding Encoding

Returns

Encoding

canEncode(char, int)

public bool canEncode(char c, int encoderIndex)

Parameters

c char
encoderIndex int

Returns

bool

canEncode(Encoding, char)

public static bool canEncode(Encoding encoding, char c)

Parameters

encoding Encoding
c char

Returns

bool

encode(char, int)

public byte[] encode(char c, int encoderIndex)

Parameters

c char
encoderIndex int

Returns

byte[]

encode(string, int)

public byte[] encode(string s, int encoderIndex)

Parameters

s string
encoderIndex int

Returns

byte[]

getCharset(int)

public Encoding getCharset(int index)

Parameters

index int

Returns

Encoding

getCharsetName(int)

public string getCharsetName(int index)

Parameters

index int

Returns

string

getECIValue(int)

public int getECIValue(int encoderIndex)

Parameters

encoderIndex int

Returns

int

getPriorityEncoderIndex()

returns -1 if no priority charset was defined

public int getPriorityEncoderIndex()

Returns

int

-1 if no priority charset was defined