Expand ECI support and enforce binary mode when ECI is set

This commit is contained in:
Robin Stuart 2017-07-23 17:59:51 +01:00
parent d818d1aecc
commit 451f0150d8
6 changed files with 52 additions and 10 deletions

View file

@ -485,7 +485,6 @@ static int supports_eci(const int symbology) {
case BARCODE_DOTCODE:
case BARCODE_GRIDMATRIX:
case BARCODE_HANXIN:
case BARCODE_UPNQR:
result = 1;
break;
}
@ -991,6 +990,10 @@ int ZBarcode_Encode(struct zint_symbol *symbol, const unsigned char *source,int
if ((symbol->input_mode < 0) || (symbol->input_mode > 2)) {
symbol->input_mode = DATA_MODE;
}
if (symbol->eci != 3) {
symbol->input_mode = DATA_MODE;
}
if (symbol->input_mode == GS1_MODE) {
for (i = 0; i < in_length; i++) {