catenateArrayItems returns incorrect character encoding
I need to create a semicolon separated string from an array and I am using the catenateArrayItems function.
var X = XMPUtils.catenateArrayItems(xmpData, IPTC_DC, "subject", '; ', '"', XMPConst.SEPARATE_ALLOW_COMMAS);
This works, but if the values contain special characters (diacritics), the resulting string characters are not correct. I don't have this problem when retrieving simple propertues or when retrieving individual parts of the array, only when I use XMPUtils.catenateArrayItems.
Example data:
<dc:subject>
<rdf:Bag>
<rdf:li>façade</rdf:li>
<rdf:li>Jacques de Liége</rdf:li>
<rdf:li>Téte à téte</rdf:li>
<rdf:li>Suiksŏng i nop´ŭn yŏltae megi rŭl tŏ mani kirŭja!</rdf:li>
<rdf:li>Это красивое описание красивое здание</rdf:li>
</rdf:Bag>
</dc:subject>
Results from
XMPUtils.catenateArrayItems(xmpData,XMPConst.NS_DC, "subject", '; ', '"', XMPConst.SEPARATE_ALLOW_COMMAS);
façade; Jacques de Liége; Téte à téte; Suiksŏng i nop´Ån yŏltae megi rÅl tŏ mani kirÅja!; Ðто красивое описание красивое здание
--------------------------------------
Results from
for(var i = 1;i <= items;i++)
{
arrItem = xmpData.getArrayItem(XMPConst.NS_DC, "subject", i);
IPTCxRite.write ('\t' + arrItem);
$.writeln(arrItem);
}
façade
Jacques de Liége
Téte à téte
Suiksŏng i nop´ŭn yŏltae megi rŭl tŏ mani kirŭja!
Это красивое описание красивое здание
Is there something else I need to do to get XMPUtils.catenateArrayItems to return the correct characters or is there another way to join the array items into a single string?
Thanks,
Greg Reser
