Skip to content

Regression in XMP parsing since exiftool 13.22 #348

@ruippeixotog

Description

@ruippeixotog

I was trying to update Immich to the latest exiftool version and I noticed that exiftool is now failing to parse a few XMP files used by the project for testing. For example, taking XMP file 2000.xmp:

❯ exiftool-13.21/exiftool 2000.xmp
ExifTool Version Number         : 13.21
File Name                       : 2000.xmp
Directory                       : .
File Size                       : 10 kB
File Modification Date/Time     : 2025:08:29 13:10:00+00:00
File Access Date/Time           : 2025:08:29 13:10:50+00:00
File Inode Change Date/Time     : 2025:08:29 13:10:48+00:00
File Permissions                : -rw-r--r--
File Type                       : XMP
File Type Extension             : xmp
MIME Type                       : application/rdf+xml
Warning                         : XMP is double UTF-encoded
XMP Toolkit                     : XMP Core 5.6.0
Creator Tool                    : Adobe Photoshop Lightroom 4.1 (Macintosh)
Modify Date                     : 2000:09:27 14:35:33+02:00
Metadata Date                   : 2000:09:27 14:35:33+02:00
Create Date                     : 2000:09:27 14:35:33+02:00

❯ exiftool-13.22/exiftool 2000.xmp
ExifTool Version Number         : 13.22
File Name                       : 2000.xmp
Directory                       : .
File Size                       : 10 kB
File Modification Date/Time     : 2025:08:29 13:10:00+00:00
File Access Date/Time           : 2025:08:29 13:10:50+00:00
File Inode Change Date/Time     : 2025:08:29 13:10:48+00:00
File Permissions                : -rw-r--r--
File Type                       : XMP
File Type Extension             : xmp
MIME Type                       : application/rdf+xml
Warning                         : Superfluous BOM at start of XMP
MIME Encoding                   : utf-16le
Byte Order Mark                 : Yes
Newlines                        : Windows CRLF

As you can see, exiftool 13.22 fails to parse exif tags for this file, including only file information. This seems to happen because the file is UTF-16 encoded; converting it to UTF-8 fixes the problem:

❯ iconv -f UTF-16LE -t UTF-8 2000.xmp > 2000-utf8.xmp

❯ exiftool-13.22/exiftool 2000-utf8.xmp
ExifTool Version Number         : 13.22
File Name                       : 2000-utf8.xmp
Directory                       : .
File Size                       : 5.1 kB
File Modification Date/Time     : 2025:08:29 13:19:52+00:00
File Access Date/Time           : 2025:08:29 13:19:53+00:00
File Inode Change Date/Time     : 2025:08:29 13:19:52+00:00
File Permissions                : -rw-r--r--
File Type                       : XMP
File Type Extension             : xmp
MIME Type                       : application/rdf+xml
Warning                         : Superfluous BOM at start of XMP
XMP Toolkit                     : XMP Core 5.6.0
Creator Tool                    : Adobe Photoshop Lightroom 4.1 (Macintosh)
Modify Date                     : 2000:09:27 14:35:33+02:00
Metadata Date                   : 2000:09:27 14:35:33+02:00
Create Date                     : 2000:09:27 14:35:33+02:00

I checked the CHANGELOG and I didn't see any indication of this change. Is it a bug or expected behavior?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions