Mercurial > hg > orthanc
changeset 6623:241f2169c029
added warning about utf8 and system-wide libminizip
| author | Sebastien Jodogne <s.jodogne@gmail.com> |
|---|---|
| date | Tue, 17 Mar 2026 08:43:21 +0100 |
| parents | 91f2ac416601 |
| children | bc0fce665a1c |
| files | OrthancFramework/Sources/Compression/ZipWriter.cpp OrthancFramework/Sources/Compression/ZipWriter.h |
| diffstat | 2 files changed, 19 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/OrthancFramework/Sources/Compression/ZipWriter.cpp Mon Mar 16 18:38:07 2026 +0100 +++ b/OrthancFramework/Sources/Compression/ZipWriter.cpp Tue Mar 17 08:43:21 2026 +0100 @@ -596,6 +596,21 @@ } } + + void ZipWriter::SetAllowUtf8(bool allowUtf8) + { + allowUtf8_ = allowUtf8; + +#if ORTHANC_USE_SYSTEM_MINIZIP == 1 + if (allowUtf8_) + { + LOG(WARNING) << "UTF-8 paths requested in ZIP file, but Orthanc is linked against " + << "the system-wide minizip library, which may not support this feature"; + } +#endif + } + + void ZipWriter::SetCompressionLevel(uint8_t level) { if (level >= 10)
--- a/OrthancFramework/Sources/Compression/ZipWriter.h Mon Mar 16 18:38:07 2026 +0100 +++ b/OrthancFramework/Sources/Compression/ZipWriter.h Tue Mar 17 08:43:21 2026 +0100 @@ -154,13 +154,13 @@ * The behavior of Orthanc <= 1.12.10 corresponds to * "SetAllowUtf8(false)". * + * Note that if linking against the system-wide version of minizip, + * there is no way to check that its version is above 1.3.2. + * * https://zlib.net/ChangeLog.txt * https://discourse.orthanc-server.org/t/seriesdescription-characters-and-removed-during-oe2-zip-export/6397 **/ - void SetAllowUtf8(bool allowUtf8) - { - allowUtf8_ = allowUtf8; - } + void SetAllowUtf8(bool allowUtf8); bool IsAllowUtf8() const {
