-
-
Notifications
You must be signed in to change notification settings - Fork 4
Add fallback for undefined UserComment strings #37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thanks for this. It seems that the new switch produces invalid strings in some cases, which I must admit I don't understand how could happen. I have added your failing image to the test setup. |
darktable and potentially any program that uses exiv2 will set the type for the exif UserComment tag to undefined for utf-8 encoded strings. exiftool will happily decode such a string. This patch adds a fallback that tries to decode this type of strings as utf-8, otherwise return the empty string.
7c8845e to
c2fbacd
Compare
|
It actually makes sense if you look at the dump of the failed test image: The |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #37 +/- ##
==========================================
- Coverage 77.05% 76.95% -0.10%
==========================================
Files 14 14
Lines 1691 1697 +6
==========================================
+ Hits 1303 1306 +3
- Misses 303 305 +2
- Partials 85 86 +1 ☔ View full report in Codecov by Sentry. |


darktable and potentially any program that uses exiv2 will set the type for the exif UserComment tag to undefined for utf-8 encoded strings.
exiftool will happily decode such a string.
This patch adds a fallback that tries to decode this type of strings as utf-8, otherwise return the empty string.