Repository navigation
Replace deprecated UTF-8 conversion and reduce build warnings - #27
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the Unix UTF-8 conversion and compatibility updates.
No open issues 🎉
What changed in this PR
This PR modernizes MEXlibCZI’s Unix UTF-8 conversion and reduces compiler warnings while preserving Windows conversion behavior.
Changes:
- Replace deprecated conversion APIs with validated iconv conversion and a RapidJSON fallback.
- Fix Octave dimension-type compatibility and address warnings in library code.
- Add native Unicode and malformed-input tests, including fallback coverage.
| File | Description |
|---|---|
tests/native/utf8_conversion_test.cpp |
Test Unicode filenames, boundaries, locale independence, and malformed input. |
tests/native/CMakeLists.txt |
Register conversion tests for the default and fallback implementations. |
OctaveMex/octavelibczi.c |
Convert dimension arrays explicitly between size_t and mwSize. |
lib/src/implementation/utils.cpp |
Replace deprecated Unix conversion with iconv and RapidJSON paths. |
lib/src/implementation/inc_libczi.h |
Guard the static-library macro against redefinition. |
lib/src/implementation/argsutils.cpp |
Explicitly reject unsupported pixel types in the switch. |
lib/src/functions/func_createcziwriter.cpp |
Avoid unused-exception warnings when logging is disabled. |
lib/CMakeLists.txt |
Configure iconv support and declare the RapidJSON build dependency. |
CMakeLists.txt |
Discover iconv in the parent scope for library and test configuration. |
Review effort: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Remove warnings from MEXlibCZI's code and replace deprecated std::wstring_convert/std::codecvt_utf8 on Unix. The macOS release log had 38 compiler warnings; the updated macOS build has one, in upstream libCZI code.
Validation: CI run passed on Ubuntu 22.04/24.04/26.04, Windows x64, and macOS 15 ARM64, including native tests and MATLAB/Octave regression suites. All three Unix native tests passed, and Windows passed both native tests. git diff --check passed.
Remaining compiler warnings originate in the pinned libCZI/JPEG XR/Zstd dependency sources; this change does not suppress them. No release was published.