Describe the bug
exiv2 insists that "unicode" in UserComment is UTF-16BE. Previous versions of the EXIF specification weren't specific which flavour of Unicode should be used, but v.3 clearly says "UTF-8".
To Reproduce
Steps to reproduce the behavior:
exiv2 -M"set Exif.Photo.UserComment charset=Unicode test" any.jpg
od -cx any.jpg
Expected behavior
UTF-8 encoded string "test" should be present. Instead, there's UTF-16BE (w/o BOM)
Desktop (please complete the following information):
- OS and version: Ubuntu 25.10
- Exiv2 version and source: exiv2 0.28.5 from the ubuntu repo
- Compiler and version: -
- Compilation mode and/or compiler flags: -
Additional context
See EXIF v.3 spec here https://www.cipa.jp/std/documents/download_e.html?DC-008-Translation-2023-E