• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Can I automate the writing of XMP metadata into JPEG and TIFF files?

New Here ,
Oct 31, 2008 Oct 31, 2008

Copy link to clipboard

Copied

I have written an ASP.NET 3.5 website application on behalf of an annual international photographic competition. Entrants will be uploading digital photos in either JPEG or TIFF format. Ideally, I would write entrant identity and image title information into the XMP metadata for each image immediately after upload - but so far, I have failed to find any way to do this in ASP.NET.

Thousands of images are involved, so I need to find a way to automate the metadata insertion, perhaps with some sort of script that uses a text file (extracted from the SQL Server database on my website) as the source of the metadata for a batch of images. Is this the sort of task that can be done by writing a script for Bridge CS3? Are there any scripts already in existence that I could use? I am a total beginner in this area.

I use a Win XP PC, though I have a colleague who, I think, has CS3 on his Mac (running under the Leopard OS), so scripts for either platform might be usable.

David
TOPICS
Scripting

Views

9.8K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
replies 104 Replies 104
New Here ,
Nov 04, 2008 Nov 04, 2008

Copy link to clipboard

Copied

Paul,
There are now 3 people who have been unable to get your script to work (i.e. 3poulakia, myself and the person who contacted me by email). It's unlikely that we are all doing something wrong. My best guess is that your script depends on some library or other that you have and we don't.

Any ideas?

David

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Nov 04, 2008 Nov 04, 2008

Copy link to clipboard

Copied

Hi David, I have added some try-catch blocks so it should now indicate where and why it doesn't work.

Please could you try this..



#target bridge

if( BridgeTalk.appName == "bridge" ) {

addInfo = new MenuElement("command", "Update Entry Details", "at the end of Thumbnail");

}

addInfo .onSelect = function () {

main();

}

function main(){

var csv = File.openDialog("Please select CSV file.","CSV File:*.csv");

if(csv != null){

loadXMPScript();

csv.open("r");

while(!csv.eof){

strInputLine = csv.readln();

if (strInputLine.length > 3) {

strInputLine = strInputLine.replace(/\\/g,'/');

inputArray = strInputLine.split(",");

var csvFile = new File(inputArray[0]);

var title = inputArray[1];

var author = inputArray[2];



if(!csvFile.exists) {

alert(csvFile + " Does not exist"); //////////Check if file exists

return;

}



if(csvFile.exists){

var file = new Thumbnail(csvFile);

try{

var xmpFile = new XMPFile(file.path, XMPConst.UNKNOWN,XMPConst.OPEN_FOR_UPDATE);

}catch(e){

alert("Problem opening xmp for update:-\r" + file.path +"\r" +e.message);

return;

}

try{

var xmp = xmpFile.getXMP();

}catch(e){

alert("Problem opening xmp data:-\r" + e.message);

return;

}

xmp.deleteProperty(XMPConst.NS_DC, "creator");

xmp.deleteProperty(XMPConst.NS_DC, "title");

try{

xmp.appendArrayItem(XMPConst.NS_DC, "creator", author, 0,XMPConst.ARRAY_IS_ORDERED);

xmp.appendArrayItem(XMPConst.NS_DC, "title", title, 0,XMPConst.ARRAY_IS_ORDERED);

}catch(e){

alert("Problem writing xmp data:-\r" + e.message);

return;

}

if (xmpFile.canPutXMP(xmp)) {

xmpFile.putXMP(xmp);

}else{

alert("Can not write new metadata to " + csvFile.spec);

}

xmpFile.closeFile(XMPConst.CLOSE_UPDATE_SAFELY);

}

}

}

}

}

unloadXMPScript();



function loadXMPScript()

{

var results = new XMPLibMsg("XMPScript Library already loaded", 0, false);



if (!ExternalObject.AdobeXMPScript)

{

try

{

ExternalObject.AdobeXMPScript = new ExternalObject('lib:AdobeXMPScript');

results.message = "XMPScript Library loaded";

}

catch (e)

{

results.message = "ERROR Loading AdobeXMPScript: " + e;

results.line = e.line;

results.error = true;

}

}



return results;

}

function unloadXMPScript()

{

var results = new XMPLibMsg("XMPScript Library not loaded", 0, false);



if( ExternalObject.AdobeXMPScript )

{

try

{

ExternalObject.AdobeXMPScript.unload();

ExternalObject.AdobeXMPScript = undefined;

results.message = "XMPScript Library successfully unloaded";

}

catch (e)

{

results.message = "ERROR unloading AdobeXMPScript: " + e;

results.line = e.line;

results.error = true;

}

}



return results;

}

function XMPLibMsg (inMessage, inLine, inError)

{

this.message = inMessage;

this.line = inLine;

this.error = inError;

}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 04, 2008 Nov 04, 2008

Copy link to clipboard

Copied

Hi Paul,
I've just tried your latest script. It fails with the message:

Problem opening xmp for update:-
C:\Documents and Settings\......\MyImage.jpg XMPFile does not have a constructor.

David

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Nov 04, 2008 Nov 04, 2008

Copy link to clipboard

Copied

I am no expert on these error messages, but looking at file path it is using backslashes, there is some code earlier to try to make them into forward slashes, as on a PC you would have to have a path with TWO backslashes for it to work OR single forward slashes (If that makes sense.

Have you tried just one or two files in the csv file using forward slashes?

If you could try this at least we could rule it out.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 04, 2008 Nov 04, 2008

Copy link to clipboard

Copied

Paul,
You need to check the results of your loadXMPScript call. The 'no constructor'
message probably means that the DLL didn't get loaded correctly.

-X

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Nov 04, 2008 Nov 04, 2008

Copy link to clipboard

Copied

You are the man X!

Ok here is another version with a check for the dll.



#target bridge

if( BridgeTalk.appName == "bridge" ) {

addInfo = new MenuElement("command", "Update Entry Details", "at the end of Thumbnail");

}

addInfo .onSelect = function () {

main();

}

function main(){

var csv = File.openDialog("Please select CSV file.","CSV File:*.csv");

if(csv != null){

loadXMPScript();

csv.open("r");

while(!csv.eof){

strInputLine = csv.readln();

if (strInputLine.length > 3) {

strInputLine = strInputLine.replace(/\\/g,'/');

inputArray = strInputLine.split(",");

var csvFile = new File(inputArray[0]);

var title = inputArray[1];

var author = inputArray[2];



if(!csvFile.exists) {

alert(csvFile + " Does not exist"); //////////Check if file exists

return;

}



if(csvFile.exists){

var file = new Thumbnail(csvFile);

try{

var xmpFile = new XMPFile(file.path, XMPConst.UNKNOWN,XMPConst.OPEN_FOR_UPDATE);

}catch(e){

alert("Problem opening xmp for update:-\r" + file.path +"\r" +e.message);

return;

}

try{

var xmp = xmpFile.getXMP();

}catch(e){

alert("Problem opening xmp data:-\r" + e.message);

return;

}

xmp.deleteProperty(XMPConst.NS_DC, "creator");

xmp.deleteProperty(XMPConst.NS_DC, "title");

try{

xmp.appendArrayItem(XMPConst.NS_DC, "creator", author, 0,XMPConst.ARRAY_IS_ORDERED);

xmp.appendArrayItem(XMPConst.NS_DC, "title", title, 0,XMPConst.ARRAY_IS_ORDERED);

}catch(e){

alert("Problem writing xmp data:-\r" + e.message);

return;

}

if (xmpFile.canPutXMP(xmp)) {

xmpFile.putXMP(xmp);

}else{

alert("Can not write new metadata to " + csvFile.spec);

}

xmpFile.closeFile(XMPConst.CLOSE_UPDATE_SAFELY);

}

}

}

}

}

unloadXMPScript();



function loadXMPScript()

{

var results = new XMPLibMsg("XMPScript Library already loaded", 0, false);



if (!ExternalObject.AdobeXMPScript)

{

try

{

ExternalObject.AdobeXMPScript = new ExternalObject('lib:AdobeXMPScript');

results.message = "XMPScript Library loaded";

}

catch (e)

{

alert("Could not load AdobeXMPScript \r" + e.message);

results.message = "ERROR Loading AdobeXMPScript: " + e;

results.line = e.line;

results.error = true;

}

}



return results;

}

function unloadXMPScript()

{

var results = new XMPLibMsg("XMPScript Library not loaded", 0, false);



if( ExternalObject.AdobeXMPScript )

{

try

{

ExternalObject.AdobeXMPScript.unload();

ExternalObject.AdobeXMPScript = undefined;

results.message = "XMPScript Library successfully unloaded";

}

catch (e)

{

results.message = "ERROR unloading AdobeXMPScript: " + e;

results.line = e.line;

results.error = true;

}

}



return results;

}

function XMPLibMsg (inMessage, inLine, inError)

{

this.message = inMessage;

this.line = inLine;

this.error = inError;

}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 04, 2008 Nov 04, 2008

Copy link to clipboard

Copied

I re-ran your latest script with a modified version of my CSV file, in which all backslashes were replaced by forward slashes. It still failed. Rather oddly, the error message was exactly the same as before - with backslashes.

David

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Nov 04, 2008 Nov 04, 2008

Copy link to clipboard

Copied

Could you try the last version and see if the DLL ('lib:AdobeXMPScript') is loading?
If it isn't it would explain everything.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 04, 2008 Nov 04, 2008

Copy link to clipboard

Copied

Any idea if this script would run on a MAC CS3 environment?

I keep on trying it but doesn't seem to work

Thank you
michael

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Nov 04, 2008 Nov 04, 2008

Copy link to clipboard

Copied

3poulakia :
Yes I have tested it on my iMac G5 with no problems.

David the dll should be found here..
Could you see if it exists?

C:\Program Files\Adobe\Adobe Bridge CS3\AdobeXMPScript.dll

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 04, 2008 Nov 04, 2008

Copy link to clipboard

Copied

I've just realised that I mistyped my version of Bridge in my OP. Apologies for the misleading information. I have Bridge CS2, not CS3. Does that perhaps explain my problem?

Obviously, I don't have an Adobe Bridge CS3 folder. Neither do I have an Adobe Bridge CS2 folder. The nearest I have to your quoted path is C:\Program Files\Adobe\Adobe Bridge\ but it doesn't contain AdobeXMPScript.dll (and a search shows that this file is nowhere on my PC).

David

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Nov 04, 2008 Nov 04, 2008

Copy link to clipboard

Copied

Yup thats the problem David, if I get a chance tomorrow I will have a try using CS2 with the original script and see if I can get that working.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 04, 2008 Nov 04, 2008

Copy link to clipboard

Copied

Thanks, Paul. Sorry for not spotting that error earlier.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 04, 2008 Nov 04, 2008

Copy link to clipboard

Copied

Hi Paul R,

Reading everyones comments on errors and double checking mine, I think my problem was NOT your script but the fact that there are GREEK characters involved on both the filenames and their relative descriptions.
Since csv and Greek do not work together well, do you think you can modify the script so it reads from an XLS and NOT a CSV file? I hope it is a minor modification. CS3 on Mac always.

Thank you in advance
3poulakia

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Nov 05, 2008 Nov 05, 2008

Copy link to clipboard

Copied

3poulakia - sorry javasript can not access a xls file direct that's why a csv file is the prefered method.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 05, 2008 Nov 05, 2008

Copy link to clipboard

Copied

As long as the contents of the file are Unicode and you specify UTF-8 (or UTF-16
if needed) when you open the file, you should be ok reading the file. In theory.
I've switched to UTF-8 for my scripts' ini files. It has eliminated a large
number of recurring problems for me.

As far as the filename goes, I don't have a clue.

-X

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Nov 05, 2008 Nov 05, 2008

Copy link to clipboard

Copied

That's nice to know X, Thank you.

David.
I have had to resort to creating a template on the fly to get things working with Bridge CS2, this seems to work on my system, lets hope it works for you.



#target bridge

if( BridgeTalk.appName == "bridge" ) {

addInfo = new MenuElement("command", "Update Entry Details", "at the end of Thumbnail");

}

addInfo .onSelect = function () {

main();

}

function main(){

var csv = File.openDialog("Please select CSV file.","CSV File:*.csv");

if(csv != null){

csv.open("r");

while(!csv.eof){

strInputLine = csv.readln();

if (strInputLine.length > 3) { // Make sure it isn't a blank line

strInputLine = strInputLine.replace(/\\/g,'/'); //Change backslash to forward slash.

inputArray = strInputLine.split(",");

var csvFile = new File(inputArray[0]);

var title = inputArray[1];

var author = inputArray[2];

if(csvFile.exists){ //Check if file exists

item = new Thumbnail(csvFile);

md =item.synchronousMetadata;

var result =addTitleAuthor(md,inputArray[1],inputArray[2]);

}

}

}

}

}



function addTitleAuthor(metadata, Title, Author)

{

var strTmpl = "TempTmpl";

var strUser = Folder.userData.absoluteURI;

var filTmpl = new File(strUser + "/Adobe/XMP/Metadata Templates/" + strTmpl + ".xmp");

var fResult = false;

try

{ if (filTmpl.exists)

filTmpl.remove();

fResult = filTmpl.open("w");

if (fResult)

// CS3

{

//CS3

//filTmpl.writeln("<x:xmpmeta xmlns:x=\"adobe:ns:meta/\" x:xmptk=\"Adobe XMP Core 4.1-c037 46.282696, Mon Apr 02 2007 18:36:42 \">");

//CS2

filTmpl.writeln("<x:xmpmeta xmlns:x=\"adobe:ns:meta/\" x:xmptk=\"3.1.2-113\">");

filTmpl.writeln("<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">");

filTmpl.writeln("<rdf:Description rdf:about=\"\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\">");

filTmpl.writeln("<dc:title>");

filTmpl.writeln("<rdf:Alt>");

filTmpl.writeln("<rdf:li xml:lang=\"x-default\">"+Title+"</rdf:li>");

filTmpl.writeln("</rdf:Alt>");

filTmpl.writeln("</dc:title>");

filTmpl.writeln("<dc:creator>");

filTmpl.writeln("<rdf:Seq>");

filTmpl.writeln("<rdf:li>" + Author + "</rdf:li>");

filTmpl.writeln("</rdf:Seq>");

filTmpl.writeln("</dc:creator>");

filTmpl.writeln("</rdf:Description>");

filTmpl.writeln("</rdf:RDF>");

filTmpl.writeln("</x:xmpmeta>");

fResult = filTmpl.close();

metadata.applyMetadataTemplate(strTmpl, "replace");

filTmpl.remove();

} }

catch(e)

{ fResult = false; }

return fResult;

};

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 05, 2008 Nov 05, 2008

Copy link to clipboard

Copied

xbytor,

I fill in the fields of my xls file with the Greek data and save it as normal. Now, when I try to save the file in csv format compatibility issues are raised. Excel prompts me to save a copy in the latest Excel format. From then on whichever combination I may have tried of saving it on a CSV file has failed. Even when I save it as a UTF-16 (this file opens up with no compatibility issues as you said), it gets completely messed up trying to save it in CSV.

What do you mean when you say "I've switched to UTF-8 for my scripts ini files". How could I do that on my Mac? Would it screw things up for me if I do something wrong?

Does anyone else have any suggestions on how to solve these issues?

Thank you in advance,
Michael

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 05, 2008 Nov 05, 2008

Copy link to clipboard

Copied

> Does anyone else have any suggestions on how to solve these issues?
>

Paul's script needs to be changed to read UTF-8 or UTF-16 from the csv file.

-X

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 05, 2008 Nov 05, 2008

Copy link to clipboard

Copied

Paul,
I've just tried your Bridge CS2 script. We are making progress but it's still not quite right. My test CSV file has 6 rows but the metadata updates were processed only for the files listed in row 1 and row 3. All 6 test images are in the same folder and are all my own JPEGs (derived from images taken by the same camera). Very strange.

David

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 05, 2008 Nov 05, 2008

Copy link to clipboard

Copied

xbytor,

Do you probably mean "Paul's script needs to be changed to read FROM a UTF-16 file."?
Because that is the only format I can save. I canNOT save a CSV from the UTF-16 file.

Paul,
Would this be feasible?

Michael

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 05, 2008 Nov 05, 2008

Copy link to clipboard

Copied

3poulakia@adobeforums.com wrote:
>
> Do you probably mean "Paul's script needs to be changed to read FROM a UTF-16 file."?
>

Yep. Just sloppy with my grammar today :)

-X

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Nov 06, 2008 Nov 06, 2008

Copy link to clipboard

Copied

That is strange David. I have added an error log, that reports if a file does not exist or if it can not apply the template. This error report should automatically open when it has finished going through the csv file.



#target bridge

if( BridgeTalk.appName == "bridge" ) {

addInfo = new MenuElement("command", "Update Entry Details", "at the end of Thumbnail");

}

addInfo .onSelect = function () {

main();

}

main();

function main(){

var csv = File.openDialog("Please select CSV file.","CSV File:*.csv");

if(csv != null){

var errorlog = new File("~/ErrorLog.txt");

errorlog.open('w');

errorlog.writeln("These documents have not been updated");

csv.open("r");

while(!csv.eof){

strInputLine = csv.readln();

if (strInputLine.length > 3) { // Make sure it isn't a blank line

strInputLine = strInputLine.replace(/\\/g,'/'); //Change backslash to forward slash.

inputArray = strInputLine.split(",");

var csvFile = new File(inputArray[0]);

var title = inputArray[1];

var author = inputArray[2];

if(!csvFile.exists) errorlog.writeln(decodeURI(csvFile) + " does not exist");

if(csvFile.exists){ //Check if file exists

item = new Thumbnail(csvFile);

md =item.synchronousMetadata;

var result =addTitleAuthor(md,inputArray[1],inputArray[2]);

if(!result) errorlog.writeln(decodeURI(csvFile) + " Unable to apply template");

}

}

}

}

errorlog.close();

errorlog.execute();

}



function addTitleAuthor(metadata, Title, Author)

{

var strTmpl = "TempTmpl";

var strUser = Folder.userData.absoluteURI;

var filTmpl = new File(strUser + "/Adobe/XMP/Metadata Templates/" + strTmpl + ".xmp");

var fResult = false;

try

{ if (filTmpl.exists)

filTmpl.remove();

fResult = filTmpl.open("w");

if (fResult)

// CS3

{

//CS3

//filTmpl.writeln("<x:xmpmeta xmlns:x=\"adobe:ns:meta/\" x:xmptk=\"Adobe XMP Core 4.1-c037 46.282696, Mon Apr 02 2007 18:36:42 \">");

//CS2

filTmpl.writeln("<x:xmpmeta xmlns:x=\"adobe:ns:meta/\" x:xmptk=\"3.1.2-113\">");

filTmpl.writeln("<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">");

filTmpl.writeln("<rdf:Description rdf:about=\"\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\">");

filTmpl.writeln("<dc:title>");

filTmpl.writeln("<rdf:Alt>");

filTmpl.writeln("<rdf:li xml:lang=\"x-default\">"+Title+"</rdf:li>");

filTmpl.writeln("</rdf:Alt>");

filTmpl.writeln("</dc:title>");

filTmpl.writeln("<dc:creator>");

filTmpl.writeln("<rdf:Seq>");

filTmpl.writeln("<rdf:li>" + Author + "</rdf:li>");

filTmpl.writeln("</rdf:Seq>");

filTmpl.writeln("</dc:creator>");

filTmpl.writeln("</rdf:Description>");

filTmpl.writeln("</rdf:RDF>");

filTmpl.writeln("</x:xmpmeta>");

fResult = filTmpl.close();

metadata.applyMetadataTemplate(strTmpl, "replace");

filTmpl.remove();

} }

catch(e)

{ fResult = false; }

return fResult;

};

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 07, 2008 Nov 07, 2008

Copy link to clipboard

Copied

Paul,

Could you please look into this as well?
i "Paul's script needs to be changed to read FROM a UTF-16 file."

Thank you,
Michael

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Nov 07, 2008 Nov 07, 2008

Copy link to clipboard

Copied

Hi Micheal, all you need to do is add one line.
Find this line below
csv.open("r");
Then add this line after the above line.
csv.encoding = "UTF-16";

According to the documentation there is Greek as well, so if UTF-16 doesn't work you could try this?
csv.encoding = "X-MAC-GREEK";

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines