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.

Exporting with CR/LF from Mac

Featured Replies

  • Newbies

I need to export some data from Filemaker Pro 7 and it needs to have a CR/LF at the end of each record. If I do this on a PC it works fine. On my Mac it only puts a CR at the end. Is there a way to put both the CR and LF on a Mac?

In your export dialog you can select the export character set. You should use either Windows (ANSI) or ASCII (DOS).

  • 3 weeks later...
  • Newbies

I need to do the same thing ... I'm exporting to a text file (from FM7 on the Mac). I then need to open this text file in Windows, but the CR is not recognized (much less a LF). Answer IDs 949 and 4071 (on the Filemaker.com support site) touch on this subject. However neither answers the question on how to implement embedding of the Windows CR/LF in the text file generated on FM Mac.

I've tried all the export formats : ANSI, ASCII, Unicode, but to no avail. The CR generated on the Mac shows up as a null (a square box) when the file is opened in Windows (using a simple text program like Notepad).

Any ideas would be greatly appreciated.

Kavika

I believe it's a bug. In any case, I haven't been able to get CR/LF endings in a Windows/DOS type export, and I gather from a recent thread that the same is true (mirrored) for FMP on Windows.

I would post-process the exported file in a text editor, such as TextWrangler (free).

You can also export as xml and use an xsl stylesheet to explicitly write the line separator. I've used the Unix line return, LF only:

<xsl:text>&#10;</xsl:text>

which, when saved as Unicode will open on either Mac or Windows.

You can also post-process the file with AppleScript:

set outputFile to (((path to desktop) as text) & "gText.txt") as file specification

tell application "Finder" -- needed inside FileMaker

set theText to read outputFile

set old_delimts to AppleScript's text item delimiters

try

set AppleScript's text item delimiters to {ASCII character 13}

set textList to text items of theText

set AppleScript's text item delimiters to {(ASCII character 13) & (ASCII character 10)}

set newText to (textList as text)

on error errMess number errNum

set AppleScript's text item delimiters to old_delimts

end try

set AppleScript's text item delimiters to {""}

open for access outputFile with write permission

set eof of outputFile to 0

write newText to outputFile starting at eof

close access outputFile

end tell

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.