Newbies Bill Driskell Posted May 20, 2005 Newbies Posted May 20, 2005 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?
BobWeaver Posted May 20, 2005 Posted May 20, 2005 In your export dialog you can select the export character set. You should use either Windows (ANSI) or ASCII (DOS).
Newbies TahitiFM Posted June 9, 2005 Newbies Posted June 9, 2005 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
comment Posted June 9, 2005 Posted June 9, 2005 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).
Fenton Posted June 10, 2005 Posted June 10, 2005 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> </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
Recommended Posts
This topic is 7107 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now