Skip to content

exiv2 insists on UTF-18BE UserComment, contrary to EXIF 3.0 spec #3414

@av223119

Description

@av223119

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions