lsmall Posted September 4, 2012 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.
comment Posted September 4, 2012 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.
lsmall Posted September 4, 2012 Author 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.
dansmith65 Posted September 4, 2012 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.
lsmall Posted September 12, 2012 Author Posted September 12, 2012 Thanks. I went with an applescript. Works nicely.
beverly Posted October 5, 2012 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! :)
Recommended Posts
This topic is 4430 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