July 27, 200520 yr I'm trying to use filemaker to auto generate some php programs for me on the fly. The end result is the php code being dumped into a global field, and exporting the field contents. Unfortunately for me, the text output is unicode, and that doesn't jive with my webserver. If I manually change the text formatting from unicode to ansi the resulting .php file works fine. I'm wondering if there is a workaround so I don't have to change this manually. I appreciate your wisdom. Curt
November 21, 201015 yr i had this same problem on windows. export field contents saves as unicode. i solved it by: 1. exporting field contents to file.uni 2. using mooplug shell command to "type file.uni > file.txt" which converts unicode to ansi 3. more info on the type command here: http://www.robvanderwoude.com/type.php#Unicode 4. more info on mooplug here: http://mooplug.com/docs/functions/moo_shell
November 22, 201015 yr Assuming that your table contains at least one record... Go to Layout[Layout based on table containing your global field] # Browse to only one record Enter Browse Mode Show all records Omit Record Show omitted # Export tab-delimited file # Export only the global field Export Records[]
November 22, 201015 yr The best way, IMHO, is to export as XML and use a custom XSLT stylesheet to transform the output to the desired format (this could probably also eliminate the need to assemble the code into a global field). # Export tab-delimited file This is not the same as exporting a global field (apart from the encoding). Most notably, any carriage returns in the field will be converted to vertical tabs.
November 22, 201015 yr This is not the same as exporting a global field (apart from the encoding). Most notably, any carriage returns in the field will be converted to vertical tabs. Oh yes. Of course. Thank you for pointing that out. I forgot that the poster needed good handling of carriage returns in a PHP file. There is an alternate method which doesn't involve expertise with XSLT (and often special work to get the EOLs to come out right with Windows). Create a dedicated table to use for text file export. Create one field in this table to hold the line of text that you create with a script. Export this one field from all records as a tab-delimited file.
Create an account or sign in to comment