Jump to content

export field contents = unicode, i want ansi


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

Recommended Posts

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

Link to comment
Share on other sites

  • 5 years later...

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This topic is 4927 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.