CLI: fix batch mode fopen() -> win_fopen() (Windows)

GUI: fix `save_to_file()` `filename.toLatin1()` -> `toUtf8()`
tests: `fopen()` -> `testUtilOpen()`, `remove()` -> `testUtilRemove()`
  ticket #288, props Marcel
This commit is contained in:
gitlost 2023-05-10 21:29:09 +01:00
parent 15fdca2a03
commit dff534140a
26 changed files with 172 additions and 132 deletions

View file

@ -844,7 +844,7 @@ namespace Zint {
bool QZint::save_to_file(const QString& filename) {
if (resetSymbol()) {
strcpy(m_zintSymbol->outfile, filename.toLatin1().left(255));
strcpy(m_zintSymbol->outfile, filename.toUtf8().left(255));
if (m_segs.empty()) {
QByteArray bstr = m_text.toUtf8();
m_error = ZBarcode_Encode_and_Print(m_zintSymbol, (unsigned char *) bstr.data(), bstr.length(),