mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
Handle UNICODE_MODE ECI conversion for reduced charset barcodes and QRCODE/MICROQR
This commit is contained in:
@ -29,6 +29,7 @@
|
||||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE.
|
||||
*/
|
||||
/* vim: set ts=4 sw=4 et : */
|
||||
|
||||
/*
|
||||
* Attempts to encode DotCode according to AIMD013 Rev 1.34a, dated Feb 19, 2009
|
||||
@ -475,7 +476,7 @@ int dotcode_encode_message(struct zint_symbol *symbol, const unsigned char sourc
|
||||
array_length++;
|
||||
}
|
||||
|
||||
if (symbol->input_mode != GS1_MODE) {
|
||||
if ((symbol->input_mode & 0x07) != GS1_MODE) {
|
||||
if (length > 2) {
|
||||
if (((source[input_position] >= '0') && (source[input_position] <= '9')) &&
|
||||
((source[input_position + 1] >= '0') && (source[input_position + 1] <= '9'))) {
|
||||
@ -650,7 +651,7 @@ int dotcode_encode_message(struct zint_symbol *symbol, const unsigned char sourc
|
||||
}
|
||||
|
||||
if ((!done) && (encoding_mode == 'C')) {
|
||||
if (datum_c(source, input_position, length) || ((source[input_position] == '[') && (symbol->input_mode == GS1_MODE))) {
|
||||
if (datum_c(source, input_position, length) || ((source[input_position] == '[') && ((symbol->input_mode & 0x07) == GS1_MODE))) {
|
||||
if (source[input_position] == '[') {
|
||||
codeword_array[array_length] = 107; // FNC1
|
||||
input_position++;
|
||||
@ -751,7 +752,7 @@ int dotcode_encode_message(struct zint_symbol *symbol, const unsigned char sourc
|
||||
|
||||
/* Step C2 */
|
||||
if ((!done) && (encoding_mode == 'B')) {
|
||||
if ((source[input_position] == '[') && (symbol->input_mode == GS1_MODE)) {
|
||||
if ((source[input_position] == '[') && ((symbol->input_mode & 0x07) == GS1_MODE)) {
|
||||
codeword_array[array_length] = 107; // FNC1
|
||||
array_length++;
|
||||
input_position++;
|
||||
@ -879,7 +880,7 @@ int dotcode_encode_message(struct zint_symbol *symbol, const unsigned char sourc
|
||||
|
||||
/* Step D2 */
|
||||
if ((!done) && (encoding_mode == 'A')) {
|
||||
if ((source[input_position] == '[') && (symbol->input_mode == GS1_MODE)) {
|
||||
if ((source[input_position] == '[') && ((symbol->input_mode & 0x07) == GS1_MODE)) {
|
||||
codeword_array[array_length] = 107; // FNC1
|
||||
array_length++;
|
||||
input_position++;
|
||||
|
Reference in New Issue
Block a user