ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: BigIsland on March 27, 2023, 12:43:00 PM

Title: Error when trying to write html code to -IPTC:Caption-Abstract
Post by: BigIsland on March 27, 2023, 12:43:00 PM
The error:
sh: line 1: $'p\303\245': command not found

(https://www.fotoarkiv.no/priv/write.png)
Title: Re: Error when trying to write html code to -IPTC:Caption-Abstract
Post by: Phil Harvey on March 27, 2023, 01:00:37 PM
I don't even see if/where you are running ExifTool.  And the given error isn't an ExifTool error.

- Phil
Title: Re: Error when trying to write html code to -IPTC:Caption-Abstract
Post by: BigIsland on March 27, 2023, 04:33:50 PM
$command = isset($conf['exiftool_path']) ? $conf['exiftool_path'] : 'exiftool -m -codedcharacterset=utf8 -overwrite_original';
  $command.= ' -q';

  if (strlen($name) > 0)
  {
    # 2#105 in iptcparse($imginfo['APP13'])
    $command.= ' -IPTC:Headline="'.$name.'"';

    # 2#005 in iptcparse($imginfo['APP13'])
    $command.= ' -IPTC:ObjectName="'.wm_cutString($name, 64).'"';
  }

  if (strlen($description) > 0)
  {
    # 2#120 in iptcparse($imginfo['APP13'])
    $command.= ' -IPTC:Caption-Abstract="'.$description.'"';
  }

  if (strlen($date_creation) > 0)
  {
    # 2#055 in iptcparse($imginfo['APP13'])
    $command.= ' -IPTC:DateCreated="'.$date_creation.'"';
  }

  if (strlen($date_available) > 0)
  {
    # 2#030 in iptcparse($imginfo['APP13'])
    $command.= ' -IPTC:ReleaseDate="'.$date_available.'"';
  }
Title: Re: Error when trying to write html code to -IPTC:Caption-Abstract
Post by: BigIsland on March 28, 2023, 06:03:19 AM
I found the problem. The html code had double quotes ". changed to single quote' Problem solved.