Skip to content

Strings truncated when converting FMP12 files that contain the control character 0x001D #20

@gem-o5

Description

@gem-o5

Hi,

When converting FMP12 files to the excel, json or sqlite using the current version of fmptools, any string that contains the control character 0x001D is truncated at that point. The rest of the string is omitted from the output, resulting in incomplete data.
Reproduction Steps:

  1. Create or obtain an FMP12 file that contains a string with the 0x001D character.
    Example: "Customer Name: John Doe\x001DAdditional Info"
  2. Run the conversion command :
    fmp2json input.fmp12 output.json
  3. Inspect the output file. The string will appear as "Customer Name: John Doe" – the part after 0x001D is missing.

Expected Result:
The entire string, including the portion after 0x001D, should be preserved in the output. The control character should either be escaped, removed, or handled according to the target format’s specifications, but it should not truncate the data.

Actual Result:
The conversion stops at the first occurrence of 0x001D, discarding the rest of the string.

If you need a reproducible sample, I can share a minimal FMP12 file that demonstrates the issue.

I appreciate the effort that has gone into this tool and look forward to a fix. If you need more details, feel free to ask.

EDIT:
It would appear that string truncation may not be due to the only presence of 0x001D as sometimes it is replaced by the space character after extraction.
I can't figure out exactly why in some cases strings are cut at the character 0x001D position and sometime 0x001D is just replaced by a space character.

Edit2:
After further investigation, I've found out that there is no link between 0x001D character and fact that the sting is truckated.
I've dumped the fmp12 file with fmpdump tool, and when I looked at the output, I've realized that the text that was represented as a single string in FileMaker UI, was stored in multiple chucks in the fmp12 file, converting fmp12 file to json, excel on sqlite db only extract the first chunck.
Extract of fmpdump:

   -- field (0x06): [109] => "string part1" --
   -- field (0x0E): [28034] => "string part2" --
   -- field (0x0E): [28035] => "string part3" --
   -- field (0x0C): [28036] => "string part4" --

The text in FileMaker UI:

string part1_0x001D_string part2_0x001D_string part3_0x001D_string part4

In the json file after fmp2json I can only find the string string part1 but not string part2, string part3 or string part4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions