May 20, 200520 yr 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?
May 20, 200520 yr In your export dialog you can select the export character set. You should use either Windows (ANSI) or ASCII (DOS).
June 9, 200520 yr 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
June 9, 200520 yr 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).
June 10, 200520 yr 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
Create an account or sign in to comment