Microsoft KB Archive/110539: Difference between revisions
m (Text replacement - """ to """) |
m (Text replacement - "<" to "<") |
||
Line 27: | Line 27: | ||
<li><p>Load the text file into an editor that recognizes the linefeed characters, and then use the editor's search and replace feature to replace each linefeed with a carriage return.</p> | <li><p>Load the text file into an editor that recognizes the linefeed characters, and then use the editor's search and replace feature to replace each linefeed with a carriage return.</p> | ||
<p>To do this using the FoxPro file editor, perform the following:</p> | <p>To do this using the FoxPro file editor, perform the following:</p> | ||
<p>1. In the Command window, type "MODIFY FILE | <p>1. In the Command window, type "MODIFY FILE <filename>" (without</p> | ||
<pre> the quotation marks).</pre> | <pre> the quotation marks).</pre> | ||
<p>2. From the Edit menu, choose Find.</p> | <p>2. From the Edit menu, choose Find.</p> | ||
Line 42: | Line 42: | ||
<p>-or-</p></li> | <p>-or-</p></li> | ||
<li><p>Write a program that performs low-level file I/O and adds a carriage return to each line, as shown in the following sample program.</p> | <li><p>Write a program that performs low-level file I/O and adds a carriage return to each line, as shown in the following sample program.</p> | ||
<p>USE SYS(2004)+"\tutorial\customer.dbf" COPY TO test.txt TYPE DELIMITED FOR RECNO() | <p>USE SYS(2004)+"\tutorial\customer.dbf" COPY TO test.txt TYPE DELIMITED FOR RECNO() < 5</p> | ||
<pre> infile=FOPEN("test.txt",10) && read-only, unbuffered | <pre> infile=FOPEN("test.txt",10) && read-only, unbuffered | ||
IF infile > 0 && file opened? | IF infile > 0 && file opened? |
Revision as of 15:04, 20 July 2020
FIX: COPY TO DELIMITED Creates File with No Carriage ReturnsID: Q110539 2.50b MACINTOSH kbusage kbtshoot The information in this article applies to: - Microsoft FoxPro for Macintosh, version 2.5b SYMPTOMSIn FoxPro for Windows and FoxPro for MS-DOS, the following commands create a delimited ASCII file, with each record terminated by a carriage return and linefeed (CR/LF) combination. In FoxPro for Macintosh, the same commands create a delimited ASCII file, with each record terminated by a linefeed only. USE customer COPY TO newfile TYPE DELIMITED Many programs, such as Microsoft Word for Macintosh, require that delimited records be terminated by a carriage return at the end of each record. This problem occurs regardless of the delimiter used; for example, the problem occurs whether the DELIMITED or DELIMITED WITH TAB clause is used. RESOLUTIONThere are two possible workarounds for this problem:
STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem was corrected in FoxPro 2.6a for Macintosh. Additional reference words: FoxMac 2.50b fixlist2.60a buglist2.50b line feed hard return soft return tshoot trouble-shoot KBCategory: kbusage kbtshoot KBSubcategory: Keywords : kbcode kbtshoot kbusage Version : 2.50b Platform : MACINTOSH Solution Type : kbfix |
Last Reviewed: May 21, 1998 |