Class Iso8211WriterOptions
Options for configuring the ISO 8211 writer and builders.
public sealed class Iso8211WriterOptions
- Inheritance
-
Iso8211WriterOptions
- Inherited Members
Remarks
These options are the write-side counterpart to Iso8211ReaderOptions and control how records, fields, and subfields are encoded to ISO 8211 bytes.
Properties
AutoSizeDirectoryEntries
Gets or sets a value indicating whether directory entry field-length and field-position widths are automatically sized to fit the record, overriding the sizes declared on the record leader.
public bool AutoSizeDirectoryEntries { get; set; }
Property Value
Remarks
When false (the default), the writer preserves the entry-map sizes declared on the
leader (SizeOfFieldLengthField,
SizeOfFieldPositionField,
SizeOfFieldTagField), which yields byte-identical output
for canonically-encoded sources.
When true, the writer computes the minimum widths required to encode the record's
largest field length and position. This is useful when constructing records from scratch.
Default
Gets the default writer options (ASCII, lexical level 1, auto-sized directory entries).
public static Iso8211WriterOptions Default { get; }
Property Value
Encoding
Gets or sets the character encoding used for character-based subfield data.
public Encoding? Encoding { get; set; }
Property Value
Remarks
When null (the default), the encoding is derived from LexicalLevel:
ASCII for levels 0/1 and Unicode (UCS-2) for level 2.
LexicalLevel
Gets or sets the lexical level, which determines terminator width and character encoding.
public int LexicalLevel { get; set; }
Property Value
Remarks
Lexical level 0 and 1 use single-byte terminators (UT 0x1F, FT 0x1E) and
ASCII/UTF-8 character data. Lexical level 2 uses two-byte terminators (e.g. 0x1F 0x00)
and UCS-2 character data, consistent with Iso8211FieldReader.
The default is 1.