Skip to content

isPrintableText() seems to return false if string contains \n or \r #55

Closed
@lastzero

Description

@lastzero

This effectively converts a proper description like "Hello World\n\nWhere are you?" to "string with binary data (%d bytes)" which then shows up as image description throughout the application:

if isPrintableText(t) == false {
	phrase = fmt.Sprintf("string with binary data (%d bytes)", len(t))
	return phrase, nil
}

It seems better to allow \n, \r, and \t or return an empty string so that the value returned by Exiftool can be used as fallback. Same for Emojis if they don't qualify as printable text.

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