Exporting UTF-8 Files from FileMaker Pro

In FileMaker 16, a new function was introduced called ‘TextEncode’. It was a lifesaver and an answer to my repeated whinging about how much trouble it was in previous versions of FileMaker to export plain Jane UTF-8 files.

It is very useful for exporting files in a variety of formats. A popular file format from my perspective, is UTF-8, used by most web pages. This blog post is a note to my future self about how to easily export a file in UTF-8 format. It may be useful to other readers as well.

The key is using a container field with the text set using TextEncode. I often forget this step, the fact that it needs to be a container field and then end up exporting the words ‘utf-8.txt’ instead of an actual UTF-8 file — not very useful.

The key to this exporting is that the Export field is set to be a Container field. In this case, I am using a Global field.
Export Script
  1. Clear the global field to ensure that it is getting a fresh file.
  2. Set the Path.
  3. Set the FileName from a field.
  4. Set the Export Container field using the TextEncode function.
  5. Export Field Contents of the Container field.

Full documentation on this function is available from FileMaker here.

Comments are closed.

%d bloggers like this: