Jump to content

writing a Western Roman encoded file vs. UTF8


This topic is 5385 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This topic is 5385 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.