Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

use Export Field Contents script step to save a UTF-8 encoded file?


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

Recommended Posts

  • Newbies
Posted

I am trying to use the "Export Field Contents" script step, but when I output a file using this step I get one that is not encoded correctly. (To be specific, my web browser can't execute it properly).

I've diagnosed the problem to the file not being encoded correctly-- when I re-save the file as Unix encoded UTF-8, it executes fine.

Does anyone know of a way in FileMaker I can save a file as UTF-8?

Posted

Yes, FileMaker uses utf-16 with that step, no other option. I imagine that will not be a problem sometime in the future; but for right now it is a problem for web browsers.

One thing you can do is use Export as XML, with a simple xsl stylesheet that just gets that one field. The default for xml export is utf-8, and you can further specify it (or another encoding) in the stylesheet.

Yes, it's a bit annoying, since an export is a "found set" kind of thing. You can open a new window, just get that one record, export, then close it.

Another possibility would be write out a file using AppleScript (optionally with command line), which should also be compatible.

This example was originally posted by Bruce Robertson:

--tell application "FileMaker Pro Advanced"

copy cell "filename" of current record to fileName

copy cell "Text_" of current record to exportMe

do shell script "echo -n " & quoted form of exportMe & " > ~/desktop/" & quoted form of fileName

--end tell

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