mirror of
https://git.code.sf.net/p/zint/code
synced 2025-06-04 16:54:02 -04:00
eci: Add support for all ECIs (Big5, Korean, UCS-2BE)
This commit is contained in:
parent
9795049322
commit
7fe930b4dc
53 changed files with 51324 additions and 907 deletions
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Zint Barcode Generator - the open source barcode generator
|
||||
Copyright (C) 2009 - 2020 Robin Stuart <rstuart114@gmail.com>
|
||||
Copyright (C) 2009 - 2021 Robin Stuart <rstuart114@gmail.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -73,7 +73,9 @@ void DataWindow::okay()
|
|||
void DataWindow::from_file()
|
||||
{
|
||||
QSettings settings;
|
||||
#if QT_VERSION < 0x60000
|
||||
settings.setIniCodec("UTF-8");
|
||||
#endif
|
||||
QFileDialog open_dialog;
|
||||
QString filename;
|
||||
QFile file;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Zint Barcode Generator - the open source barcode generator
|
||||
Copyright (C) 2009 - 2020 Robin Stuart <rstuart114@gmail.com>
|
||||
Copyright (C) 2009 - 2021 Robin Stuart <rstuart114@gmail.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -29,7 +29,9 @@
|
|||
ExportWindow::ExportWindow()
|
||||
{
|
||||
QSettings settings;
|
||||
#if QT_VERSION < 0x60000
|
||||
settings.setIniCodec("UTF-8");
|
||||
#endif
|
||||
setupUi(this);
|
||||
|
||||
linDestPath->setText(settings.value("studio/export/destination", QDir::toNativeSeparators(QDir::homePath())).toString());
|
||||
|
@ -45,7 +47,9 @@ ExportWindow::ExportWindow()
|
|||
ExportWindow::~ExportWindow()
|
||||
{
|
||||
QSettings settings;
|
||||
#if QT_VERSION < 0x60000
|
||||
settings.setIniCodec("UTF-8");
|
||||
#endif
|
||||
|
||||
settings.setValue("studio/export/destination", linDestPath->text());
|
||||
settings.setValue("studio/export/file_prefix", linPrefix->text());
|
||||
|
@ -61,7 +65,9 @@ void ExportWindow::quit_now()
|
|||
void ExportWindow::get_directory()
|
||||
{
|
||||
QSettings settings;
|
||||
#if QT_VERSION < 0x60000
|
||||
settings.setIniCodec("UTF-8");
|
||||
#endif
|
||||
QString directory;
|
||||
QFileDialog fdialog;
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@ HEADERS += barcodeitem.h \
|
|||
sequencewindow.h \
|
||||
qzint.h \
|
||||
..\backend\aztec.h \
|
||||
..\backend\big5.h \
|
||||
..\backend\bmp.h \
|
||||
..\backend\channel_precalcs.h \
|
||||
..\backend\code1.h \
|
||||
|
@ -29,6 +30,7 @@ HEADERS += barcodeitem.h \
|
|||
..\backend\composite.h \
|
||||
..\backend\dmatrix.h \
|
||||
..\backend\eci.h \
|
||||
..\backend\eci_sb.h \
|
||||
..\backend\emf.h \
|
||||
..\backend\font.h \
|
||||
..\backend\gb18030.h \
|
||||
|
@ -37,6 +39,7 @@ HEADERS += barcodeitem.h \
|
|||
..\backend\gridmtx.h \
|
||||
..\backend\gs1.h \
|
||||
..\backend\hanxin.h \
|
||||
..\backend\ksx1001.h \
|
||||
..\backend\large.h \
|
||||
..\backend\maxicode.h \
|
||||
..\backend\ms_stdint.h \
|
||||
|
|
|
@ -394,82 +394,82 @@ p, li { white-space: pre-wrap; }
|
|||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>3: ISO-8859-1 Latin-1</string>
|
||||
<string>3: ISO 8859-1 Latin-1</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>4: ISO-8859-2 Latin-2</string>
|
||||
<string>4: ISO 8859-2 Latin-2</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>5: ISO-8859-3 Latin-3</string>
|
||||
<string>5: ISO 8859-3 Latin-3</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>6: ISO-8859-4 Latin-4</string>
|
||||
<string>6: ISO 8859-4 Latin-4</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>7: ISO-8859-5 Cyrillic</string>
|
||||
<string>7: ISO 8859-5 Cyrillic</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>8: ISO-8859-6 Arabic</string>
|
||||
<string>8: ISO 8859-6 Arabic</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>9: ISO-8859-7 Greek</string>
|
||||
<string>9: ISO 8859-7 Greek</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>10: ISO-8859-8 Hebrew</string>
|
||||
<string>10: ISO 8859-8 Hebrew</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>11: ISO-8859-9 Turkish</string>
|
||||
<string>11: ISO 8859-9 Turkish</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>12: ISO-8859-10 Nordic</string>
|
||||
<string>12: ISO 8859-10 Nordic</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>13: ISO-8859-11 Thai</string>
|
||||
<string>13: ISO 8859-11 Thai</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>15: ISO-8859-13 Baltic</string>
|
||||
<string>15: ISO 8859-13 Baltic</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>16: ISO-8859-14 Celtic</string>
|
||||
<string>16: ISO 8859-14 Celtic</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>17: ISO-8859-15 Latin-9</string>
|
||||
<string>17: ISO 8859-15 Latin-9</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>18: ISO-8859-16 Latin-10</string>
|
||||
<string>18: ISO 8859-16 Latin-10</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>20: Shift-JIS </string>
|
||||
<string>20: Shift JIS </string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
|
@ -494,7 +494,7 @@ p, li { white-space: pre-wrap; }
|
|||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>25: UCS-2 (BE)</string>
|
||||
<string>25: UCS-2BE</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
|
@ -504,7 +504,7 @@ p, li { white-space: pre-wrap; }
|
|||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>27: ISO-646 ASCII</string>
|
||||
<string>27: ISO 646 ASCII</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
|
@ -514,12 +514,17 @@ p, li { white-space: pre-wrap; }
|
|||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>29: GB (PRC)</string>
|
||||
<string>29: GB 2312 (PRC)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>30: Korean</string>
|
||||
<string>30: Korean KS X 1001</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>899: 8-bit binary data</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/***************************************************************************
|
||||
* Copyright (C) 2008 by BogDan Vatra <bogdan@licentia.eu> *
|
||||
* Copyright (C) 2009-2020 by Robin Stuart <rstuart114@gmail.com> *
|
||||
* Copyright (C) 2009-2021 by Robin Stuart <rstuart114@gmail.com> *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
|
@ -46,7 +46,9 @@ MainWindow::MainWindow(QWidget* parent, Qt::WindowFlags fl)
|
|||
QCoreApplication::setApplicationName("Barcode Studio");
|
||||
|
||||
QSettings settings;
|
||||
#if QT_VERSION < 0x60000
|
||||
settings.setIniCodec("UTF-8");
|
||||
#endif
|
||||
|
||||
char bstyle_text[][50] = {
|
||||
"Australia Post Redirect Code",
|
||||
|
@ -146,7 +148,7 @@ MainWindow::MainWindow(QWidget* parent, Qt::WindowFlags fl)
|
|||
#ifdef _WIN32
|
||||
bstyle->setMaxVisibleItems(cnt); /* Apart from increasing combo size, seems to be needed for filter to work */
|
||||
#endif
|
||||
#if QT_VERSION < 0x50A00
|
||||
#if QT_VERSION < 0x50A00
|
||||
/* Prior to Qt 5.10 comboboxes have display issues when filtered (scrollers not accounted for), so disable */
|
||||
filter_bstyle->hide();
|
||||
#endif
|
||||
|
@ -225,7 +227,9 @@ MainWindow::MainWindow(QWidget* parent, Qt::WindowFlags fl)
|
|||
MainWindow::~MainWindow()
|
||||
{
|
||||
QSettings settings;
|
||||
#if QT_VERSION < 0x60000
|
||||
settings.setIniCodec("UTF-8");
|
||||
#endif
|
||||
|
||||
settings.setValue("studio/window_geometry", saveGeometry());
|
||||
settings.setValue("studio/tab_index", tabMain->currentIndex());
|
||||
|
@ -278,7 +282,9 @@ void MainWindow::reset_view()
|
|||
bool MainWindow::save()
|
||||
{
|
||||
QSettings settings;
|
||||
#if QT_VERSION < 0x60000
|
||||
settings.setIniCodec("UTF-8");
|
||||
#endif
|
||||
QFileDialog save_dialog;
|
||||
QString filename;
|
||||
QString suffix;
|
||||
|
@ -367,7 +373,7 @@ void MainWindow::about()
|
|||
"<p>A free barcode generator"
|
||||
"<p>Instruction manual is available at the project homepage:<br>"
|
||||
"<a href=\"http://www.zint.org.uk\">http://www.zint.org.uk</a>"
|
||||
"<p>Copyright © 2006-2020 Robin Stuart and others.<br>"
|
||||
"<p>Copyright © 2006-2021 Robin Stuart and others.<br>"
|
||||
"Qt back end by BogDan Vatra<br>"
|
||||
"Windows port by Harald Oehlmann</p>"
|
||||
"<p>Qt version %2"
|
||||
|
@ -583,7 +589,9 @@ void MainWindow::change_options()
|
|||
{
|
||||
QUiLoader uiload;
|
||||
QSettings settings;
|
||||
#if QT_VERSION < 0x60000
|
||||
settings.setIniCodec("UTF-8");
|
||||
#endif
|
||||
|
||||
bool initial_load = m_symbology == 0;
|
||||
int original_tab_count = tabMain->count();
|
||||
|
@ -598,6 +606,7 @@ void MainWindow::change_options()
|
|||
tabMain->removeTab(1);
|
||||
|
||||
chkComposite->setText(tr("Add &2D Component"));
|
||||
cmbECI->setItemText(25, tr("29: GB 2312 (PRC)"));
|
||||
btype->setItemText(0, tr("No border"));
|
||||
combobox_item_enabled(cmbFontSetting, 1, true);
|
||||
cmbFontSetting->setItemText(2, tr("Small"));
|
||||
|
@ -841,6 +850,7 @@ void MainWindow::change_options()
|
|||
m_optionWidget=uiload.load(&file);
|
||||
file.close();
|
||||
tabMain->insertTab(1,m_optionWidget,tr("Han Xin Cod&e"));
|
||||
cmbECI->setItemText(25, tr("29: GB 18030 (PRC)"));
|
||||
connect(m_optionWidget->findChild<QObject*>("cmbHXSize"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
|
||||
connect(m_optionWidget->findChild<QObject*>("cmbHXECC"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
|
||||
connect(m_optionWidget->findChild<QObject*>("cmbHXMask"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
|
||||
|
|
|
@ -306,7 +306,7 @@ namespace Zint {
|
|||
} else if (ECIIndex >= 16 && ECIIndex <= 26) {
|
||||
m_eci = ECIIndex + 4;
|
||||
} else if (ECIIndex == 27) {
|
||||
m_eci = 899; /* 8-bit binary data TODO: support */
|
||||
m_eci = 899; /* 8-bit binary data */
|
||||
} else {
|
||||
m_eci = 0;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Zint Barcode Generator - the open source barcode generator
|
||||
Copyright (C) 2009 - 2020 Robin Stuart <rstuart114@gmail.com>
|
||||
Copyright (C) 2009 - 2021 Robin Stuart <rstuart114@gmail.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -32,7 +32,9 @@ SequenceWindow::SequenceWindow()
|
|||
{
|
||||
setupUi(this);
|
||||
QSettings settings;
|
||||
#if QT_VERSION < 0x60000
|
||||
settings.setIniCodec("UTF-8");
|
||||
#endif
|
||||
QValidator *intvalid = new QIntValidator(this);
|
||||
|
||||
linStartVal->setText(settings.value("studio/sequence/start_value", "1").toString());
|
||||
|
@ -54,7 +56,9 @@ SequenceWindow::SequenceWindow()
|
|||
SequenceWindow::~SequenceWindow()
|
||||
{
|
||||
QSettings settings;
|
||||
#if QT_VERSION < 0x60000
|
||||
settings.setIniCodec("UTF-8");
|
||||
#endif
|
||||
|
||||
settings.setValue("studio/sequence/start_value", linStartVal->text());
|
||||
settings.setValue("studio/sequence/end_value", linEndVal->text());
|
||||
|
@ -170,7 +174,9 @@ void SequenceWindow::check_generate()
|
|||
void SequenceWindow::import()
|
||||
{
|
||||
QSettings settings;
|
||||
#if QT_VERSION < 0x60000
|
||||
settings.setIniCodec("UTF-8");
|
||||
#endif
|
||||
QFileDialog import_dialog;
|
||||
QString filename;
|
||||
QFile file;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue