BUG: Word 2002 Adds a Carriage Return in the Middle of Plain Text Inserted From the Clipboard or File (313198)



The information in this article applies to:

  • Microsoft Word 2002

This article was previously published under Q313198

SYMPTOMS

When you insert plain text either from the clipboard or from a file in a Word 2002 document, and you then save and reopen the document, you may see an extra carriage return (CR) in the section in which you added the plain text.

The problem occurs if the plain text has a carriage return/line feed (CR/LF) at the position that is 256 (or a multiple of 256) characters from the start of the text. The problem is not visible at the time of the insert.

CAUSE

Word uses single CR characters for its paragraph returns. A problem in the code that parses plain text and converts CR/LF pairs into single CR characters causes the CR and LF to become separated at 256 characters (that is, the CR is the 256th character, and the LF is the 257th), so Word treats the characters separately instead of as a pair.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a text file with a CR/LF that is exactly 256 characters from the start of the file (including spaces, punctuation, and non-printing characters).
  2. Start Word 2002. A new document is created.
  3. On the Insert menu, click File. Insert the text file that you created. Note that the plain text is inserted into the Word document and that it appears correct.
  4. Save and close the document.
  5. Reopen the document. Note that there are now two CRs after the 256th character.

Modification Type:MajorLast Reviewed:12/4/2001
Keywords:kbbug KB313198