Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Exported text files have strange return character.

Featured Replies

Hi there,

I am exporting records from FMP8 on Mac (Tiger 10.4.8) using either .tab or .csv file formats.

When I then use the command line eg. 'cat testfile.tab' - the data either doesn't appear at all or is read on to a single line - the return characters dont seem to be being read correctly.

For example, I have a test file with 1 field and 3 records where data in each record is 'record1' 'record2' etc.

The outputted text file contains the literal data: -

record 1^Mrecord 2^Mrecord 3^M

Where as it should appear as:-

record1

record2

record3

I have tried exporting in various different file formats but always get the same problem.

I dont have problems reading other text files and can open the files OK and see the data with GUI editors and even Nano.

Any help would be appreciated.

Codeus

Edited by Guest

When you do your export, you can select different text encodings which will affect which line break character you get. If you are using a Mac, you should probably select Macintosh or Unicode UTF8 or UTF16. OS9 and earlier used control-M (ASCII 13) as linebreaks, but OSX is a UNIX variant, and UNIX uses ASCII-10 as a line break. For that reason, the UNIX CAT command may not recognize carriage returns a line breaks, and is displaying them in the up-arrow escape format "^M". From what I've seen, many Mac applications, to remain compatible, will recognize both ASCII-10 and ASCII-13 as a line break. Have you tried opening the export file in some other application?

I'm sort of the opposite, more of a FileMaker guy who knows some AppleScript, which sometimes uses Unix command line. The 'do shell script' command in AppleScript automatically converts Unix line endings to old-style Mac ones; you can tell it not to if you need to (often).

There are a couple of Unix commands you could try:

iconv

iconv -l gives you a list of all the formats supported (lots)

textutil (added in 10.4)

not so many formats, but can convert a .doc file to text.

I've not really used either, but they look promising.

  • Author

Thanks very much for the reponses. They have set me looking in the right direction and given me some ideas.

Thanks again,

Codeus

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.