Code128Generator.CharacterSet Property
Gets or sets the character set type for the bar code.
Namespace: DevExpress.XtraPrinting.BarCode
Assembly: DevExpress.Printing.v24.1.Core.dll
NuGet Package: DevExpress.Printing.Core
Declaration
Property Value
Type | Description |
---|---|
Code128Charset | A Code128Charset enumeration value, specifying a character set to be used. |
Available values:
Name | Description |
---|---|
CharsetA | Includes ASCII characters 00 to 95 (0-9, A-Z and control codes), special characters and FNC 1 (code that is used for special purposes). |
CharsetB | Includes ASCII characters 32 to 127 (0–9, A–Z, a–z), special characters, and FNC 1 (code that is used for special purposes). |
CharsetC | Includes ASCII digit strings (00-99) and FNC 1 (code that is used for special purposes). |
CharsetAuto | Uses A, B and C character sets and switches between them automatically according to bar code text. |
Remarks
Use the CharacterSet property to specify the set of symbols which can be used when setting the XRControl.Text property of a Code 128 bar code. If the characters specified in the Text property are not allowed by the character set, the bar code will display the following error.
Note
To avoid this message appearing for any sequences of chars, set the CharacterSet property’s value to Code128Charset.CharsetAuto. In this case, the char sequence is coded using all three character sets, and it switches between them automatically when required.
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the CharacterSet property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.