August 22, 200916 yr I am trying to write a script that generates vCalendar files. I generated the file by writing a script that saved the contents of a variable to a global, and then I exported field contents to a file. I programmed the text manipulations and calculations correctly to generate the content of the file, but when I opened the file with TextWrangler to compare it to a working vCalendar file, I noticed that the FileMaker-exported version was of format UTF8 whereas the working vCalendar file is Western Roman encoded. Does this matter and is there a way I can get FileMaker to generate a Western Roman encoded file?
August 22, 200916 yr I don't think your analysis of the situation is correct, on both counts: 1. A vCalendar file can be UTF-8 encoded; 2. When you export using Export Field Contents… the resulting file is always UTF-16 encoded. Whether this matters or not depends on your target application (though I doubt it meets the iCalendar standard). The best way to do this is via XML - see: http://fmforums.com/forum/showtopic.php?tid/192649/ http://www.myfmbutler.com/index.lasso?p=369
August 22, 200916 yr Author Thanks Comment. The reason I thought encoding was the problem was because the two files (western vs. utf8) looked identical when opened in TextWrangler-- they both SEEMED to have carriage returns. The western roman version (exported from iCal) imported into calendar programs whereas the FileMaker-exported version (which showed in TextWrangler as UTF8) did not import, although it looked syntactically identical. xsl scares me.. : but I will give it a try. thanks. I'll report back with my results! thanks to Fenton as well for his post.
August 22, 200916 yr Perhaps you should check TextWrangler's preferences. AFAIK, an export from iCal is UTF-8 encoded. Carriage returns have very little to do with the encoding. XSLT can be a little intimidating at first, but IMHO it's a worthwhile investment. It extends Filemaker's export capabilities to practically any plain text format, and - no less importantly - eliminates any export-related scripts, calculations, etc. from the solution, since the entire logic can reside in the stylesheet.
Create an account or sign in to comment