Microsoft KB Archive/313198

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

Article ID: 313198

Article Last Modified on 10/23/2006

-

APPLIES TO


 * Microsoft Word 2002 Standard Edition

-



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.



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.

Keywords: kbbug kbpending KB313198

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.