drewnoakes/metadata-extractor-dotnet
View on GitHubUNICODE EXIF UserComment tag read as BigEndian Unicode results in incorrect decoding
Open
#423 opened on Jun 12, 2024
format-exifhelp wantedimage-queue
Repository metrics
- Stars
- (1,059 stars)
- PR merge metrics
- (Avg merge 11h 24m) (1 merged PR in 30d)
Description
The metadata in the file has a UserComment tag in the Exif SubIFD directory that contains a UNICODE-encoded text containing JSON. With the existing code, the text will be decoded using BigEndianUnicode, which will result in incorrect text.
If the Encoding in TagDescriptor for the UNICODE encodingMap is set to Encoding.Unicode, it will decode properly.
Should this be just Unicode? Is there a discriminator that determines what endianess it should use?