An image with unrecognized strings

Started by ScannerBoy, February 04, 2022, 11:35:51 AM

Previous topic - Next topic

ScannerBoy

As part of my testing of my utility, I have come across a file with Portuguese strings.

I am not concerned with the interface language, but simply trying figure out whether it is a file with poorly encoded strings or if is a problem with my understanding of how to handle/display these strings
The file is attached.

Phil Harvey

The problem is that the records are out of sequence, and the CodedCharacterSet tag isn't effective because it comes after the other tags instead of before.  You can work around this by specifying the encoding with -charset iptc=utf8

> exiftool aaa.jpg -charset iptc=utf8 -iptc:all
Object Name                     : FORUM MITOS E FATOS-JOVEM PAN DISCUTE A SÃO PAULO DO FUTURO
Keywords                        : brasil
Special Instructions            : Fórum Mitos & Fatos – Jovem Pan Discute: A São Paulo do Futuro
By-line                         : Marcello Fim/Ofotográfico/Agência O Globo
By-line Title                   : Fotógrafo
City                            : São Paulo
Sub-location                    : Hotel Tivoli Mofarrej
Province-State                  : São Paulo
Country-Primary Location Code   :
Country-Primary Location Name   :
Original Transmission Reference :
Headline                        : Fórum Mitos & Fatos – Jovem Pan Discute: A São Paulo do Futuro
Credit                          : Marcello Fim
Source                          :
Copyright Notice                : Marcello Fim/Ofotográfico/Agência O Globo
Caption-Abstract                : São Paulo, SP, 11.03.2019: Fórum Mitos & Fatos – Jovem Pan Discute: A São Paulo do Futuro. Henrique Meirelles, Secretário da Fazenda do Estado de São Paulo participa do Fórum Mitos & Fatos - Jovem Pan Discute: "A São Paulo do Futuro", no Hotel Tivoli Mofarrej na zona central da capital paulista, nesta segunda-feira (11). O evento reuniu representantes do governo estadual, especialistas e empresários que se destacam em São Paulo para discutir o maior estado do país e os caminhos para a manutenção de seu crescimento. (Foto: Marcello Fim/Ofotográfico/Agência O Globo) Política
Writer-Editor                   : 30916
Coded Character Set             : UTF8
> exiftool aaa.jpg -validate -warning
Validate                        : 3 Warnings (all minor)
Warning                         : [minor] IPTC By-line too long (43 bytes; should be 32 max)
Warning                         : [minor] IPTC Country-PrimaryLocationCode too short (0 bytes; should be 3)
Warning                         : [minor] IPTC doesn't conform to spec: Records out of sequence


- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

ScannerBoy

Thank you. That does the trick.
I did try several charsets, but not UTF8 because I figured that was the default, and seemingly incorrect :-)

There is a string in the COM? segment: CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), quality = 40
So I assume that generator is the software which is responsible.
Something I need to keep in mind.

FWIW, the -validate option does report: [minor] IPTC doesn't conform to spec: Records out of sequence

but I had never run into this issue, so I did not pay attention.
Does -validate respect the verbose option?

Phil Harvey

Quote from: ScannerBoy on February 04, 2022, 02:59:13 PM
Does -validate respect the verbose option?

I don't know what you mean by "respect".  They may be used together if that's what you want.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

ScannerBoy

I guess that is  what I meant; will try it out & see :-)