lsmall Posted September 4, 2012 Share Posted September 4, 2012 Hi. I've noticed this issue before, but now it's causing problems for me so I figured I'd ask. I'm exporting a single field as a text file from FM11. This file will be used as an .ics calendar file. When I copy/paste the text field into a blank text file, no problem-it's recognized by calendar apps as an ics. If I use the export field function the calendars app won't recognize it. I noticed that the exported file is double the size of the copy/paste file, however both files look the same when opened in a text editor. I opened them in a hex editor and found that Filemaker is exporting the field data with a hex 00/Ascii Nul between every character, hence the doubling in size. This is obviously causing problems for the calendar apps that don't expect these Nul characters. Other than scripting a copy/paste function between filemaker and a text file any advice? Thanks edit: A little more on this. If I open the exported file with the nuls and delete all the text in it then put any text back in it manually, the characters all show up with nuls when I open the file in a hex editor. So when FM is exporting to a text file, it seems as though it is doing something to the file itself. I'm on a mac by the way. I haven't had a chance to try in windows. Link to comment Share on other sites More sharing options...
comment Posted September 4, 2012 Share Posted September 4, 2012 When you export field contents, the resulting file is UTF-16 encoded - which not all applications know how to handle. Several alternatives exist, for example using AppleScript or a plugin to write directly to the file, or exporting as XML with a suitable XSLT stylesheet. Link to comment Share on other sites More sharing options...
lsmall Posted September 4, 2012 Author Share Posted September 4, 2012 When you export field contents, the resulting file is UTF-16 encoded - which not all applications know how to handle. Several alternatives exist, for example using AppleScript or a plugin to write directly to the file, or exporting as XML with a suitable XSLT stylesheet. Thanks. I will give it a go. Link to comment Share on other sites More sharing options...
dansmith65 Posted September 4, 2012 Share Posted September 4, 2012 I was just dealing with a similar issue yesterday. I ended up using a plug-in to write the file. I've been using BaseElements plug-in lately because it's free and open source. Here is a link to the function to use: https://github.com/nickorr/BaseElements-Plugin/wiki/Functions#wiki-BE_WriteTextToFile It will default to UTF-8, but you can change the encoding with the BE_SetTextEncoding function. Link to comment Share on other sites More sharing options...
lsmall Posted September 12, 2012 Author Share Posted September 12, 2012 Thanks. I went with an applescript. Works nicely. Link to comment Share on other sites More sharing options...
beverly Posted October 5, 2012 Share Posted October 5, 2012 I posted an "Export Field Contents" XSLT & article http://www.filemakerhacks.com/?p=6045 Plug-in, AppleWorks, and now xml+xslt! :) Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 4220 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 accountSign in
Already have an account? Sign in here.
Sign In Now