can any body solve the string formatting problem.

can any body tell, how string ot TEXT data are save internally in a file?

actually I am writing a script which set IPTC data in Image file, but when we set iptc fields to a file, the data is saved in absurd manner.

if we set IPTC value like this, set file IPTC to file_name{caption value, caption writer, …} then we get result as

dle2STXT>0ktxtTEXT0Caption Valuektstysty|0000

any body tell, why such type of raw data is saved in the file, and what the solution to solve it.

aashi

The thing you describe is not text, but “styled text”. It may depend on the app or way you obtained your “text”… Anyway, you can simply specify (x as string), and you should obtain clean plain text (or use “x as Unicode text” if you need it).

by taking variable as string,then its not working again. the detailed explanation is below.

actually I am developing an automator action to set IPTC value by writing a script which set IPTC data in Image file, but when we set iptc fields to a file, the data is saved in absurd manner.

if we set IPTC value like this, set file IPTC to file_name{caption value, caption writer, …} then we get result as

dle2STXT>0ktxtTEXT0Caption Valuektstysty|0000

// where caption value are supplied by user in automator work flow.

any body tell, why such type of raw data is saved in the file, and what the solution to solve it.

script is as followes—

on run (input, parameters)
set caption_value to (|captionValue| of parameters) as string
set file IPTC to input{caption_value, …}
end run