1 Reply Latest reply on Dec 8, 2011 11:10 AM by TSGal

    new line character inside a text field when exporting it

    GianandreaGattinoni

      Summary

      new line character inside a text field when exporting it

      Product

      FileMaker Pro

      Version

      11.03

      Operating system version

      w7

      Description of the issue

      I'm exporting a text field that contains new line characters.

      Instead of using the standard LF (0A hex) or CR (0D hex), I found that Filemaker as new line character uses VT (0B hex).

      This character is causing a lot of problems because the application that read the text does not recognize it.

      I tried to substitute the 0B chars in the text field, but it seems that FM does not look at these chars.

      Is there any way to set up a standard LF or CR char in a text field?

      Many thanks



      Gianandrea

      Steps to reproduce the problem

      create a simple db  with just one text field
      insert at lest 2 lines of data into the text field
      export it

      Expected result

      I'm expected to have the char 0A HEX (line feed) or 0D HEX (carriage return)

      Actual result

      look into the exported file and you will see that the separator for the lines is tha char 0B HEX

      Exact text of any error message(s) that appear

      none

      FM_text_export.PNG

        • 1. Re: new line character inside a text field when exporting it
          TSGal

          Gianandrea Gattinoni:

          Thank you for your post.

          When a carriage return is entered into a field, as you have discovered, this is stored as ASCII-11 (0B Hex); not the regular ASCII-13 (0D Hex).  When you export this information, the ASCII-11 characrer is retained.  This is needed for comma-delimited and tab-delimited text files, as the ASCII-13 character signifies the beginning of a new record.

          The easiest solution would be to use a Text editor after the file is created and change the ASCII-11 characrer to ASCII-13.  However, one customer wanted to do this all from within FileMaker Pro.  In that case, a second Temporary table was set up where all the field and the first line of the text field in question was put into one field of one record in that table, subsequent lines put into separate records, and the last line and the remaining fields put into the last record.  The user then exported the temporary table to a text file, as each record (and hence each line from the text field) is exported.  I know it isn't the ideal solution, but it is a way to export the desired output from with FileMaker Pro.

          Please let me know if you need additional clarification.

          TSGal
          FileMaker, Inc.