Skip to content

Reading UTF-8 from iTXt PNGChunk #328

@RupertAvery

Description

@RupertAvery

In PNGMetadataReader.cs mentions:

    /// Note that "iTXt" chunks use UTF-8 encoding (https://www.w3.org/TR/PNG/#11iTXt).

And the document at that URL states:

The translated keyword and text both use the UTF-8 encoding

However at L:249, the keyword is read using _latin1Encoding, and the text is read in ReadTextDirectory using _latin1Encoding.

This leads to UTF-8 characters such as emoji being decoded improperly.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions