Odd -charset option problem

Started by jorese, June 28, 2022, 04:55:15 PM

Previous topic - Next topic

jorese

Tested on Windows 10/11 and Server 2016/2019
Exiftool -ver: 12.42

We use the -@ ARGFILE option to proccess a few images to keep in sync with a database
The ARGFILE is produced in latin1 charset (we can not get a correct utf8 file due to bug in output system..)
The ARGFILE looks something close to

#Orginal image
-DateTimeOriginal=2022:06:20 15:03:34
-ImageUniqueID=35dbaab7-f0aa-11ec-1111-b8cb29bd3991
-ImageDescription=Ortofoto description 2022 TESTÅÄÖ
-Keywords=TAG1;TAG2
c:/path/to/file/o/2022/06/220620_OF_Project-5cm_3007_thumb_tznf.jpg
-overwrite_original
-preserve
-execute
#Large image
-DateTimeOriginal=2022:06:20 15:03:34
-ImageUniqueID=35dbaab7-f0aa-11ec-1111-b8cb29bd3991
-ImageDescription=Ortofoto description 2022 TESTÅÄÖ
-Keywords=TAG1;TAG2
c:/path/to/file/l/2022/06/220620_OF_Project-5cm_3007_thumb_tznf.jpg
-overwrite_original
-preserve
-execute

The command we use is:
exiftool.exe -charset latin1 @ argfile.dat

From the second file in the argfile we get (the first image do not produce any warning)
Warning: Malformed UTF-8 character(s) - c:/path/to/file...

It seems that the -charset option is "reset" by the -execute row in the argfile
It is not possible to put the -charset option inside the argfile
tried a few variants without luck..

Cheers and thanks for an amazing tool
/J

StarGeek

Use the -Common_Args option.

exiftool.exe -@ argfile.dat -Common_Args -charset latin1

From the docs on the -execute option (emphasis mine)
     Execute command for all arguments up to this point on the command line (plus any arguments specified by -common_args).  The result is as if the commands were executed as separate command lines
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype