Skip to content

Unicode Byte Order in User Comment #699

@molschewski

Description

@molschewski

What I want to do

I have some AI generated pictures, the parameters used for the creation are stored in the User Comments (Exif SubIFD / User Comment). I want to read this data.

The Problem

The comments from some pictures looks like Chinese. This is unexpected, I also use a command line tool, exiftool, and this shows all comments in English.

The Error in Detail

I reversed the byte order for the illegible file, and got the English text. So it is a byte order problem.

I locked into TagDescriptor.getEncodedTextDescription(int tagType). This function uses always UTF-16LE for Unicode.

The function TiffReader.processTiff sets the correct byte order in the reader, but this information is not used. I have no idea, what is the preferred way to pass this information to the TagDescriptor? Implementing a switch between UTF-16LE and UTF-16BE would be easy.

Thanks for reading

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions