PRB: _CLIPTEXT Loses Line Feeds (ASCII 10) (268478)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 6.0
This article was previously published under Q268478 SYMPTOMS
When accessing information that is pasted to the Windows Clipboard through the _CLIPTEXT system variable, line feed (ASCII 10) characters are removed. Also, when assigning a value to the _CLIPTEXT system variable, line feed characters converted to carriage return (ASCII 13) characters.
CAUSE
Visual FoxPro is expecting carriage returns (ASCII 13) to be used for end-of-row or end-of-line terminators and, therefore, replaces lines feeds (ASCII 10) with carriage returns (ASCII 13) when assigning a value to the _CLIPTEXT system variable.
NOTE: No other ASCII characters are affected in this manner.
RESOLUTION
When access to the original text pasted in the Clipboard is required and the loss of line feeds causes problems, you may retrieve the same information through the FoxTools Library GETCLIPDAT() function, as follows:
Local lcClipText
Set Library To (Home()+"FoxTools.Fll")
If OpenClip(0)
lcClipText = GetClipDat(1)
CloseClip()
Else
lcClipText = Space(0)
Endif
REFERENCES
For additional information about the FoxTools Library, please refer to the Help file located where you have Visual FoxPro installed, in the Tools folder. The Help file name is FOXTOOLS.CHM.
Modification Type: | Major | Last Reviewed: | 8/9/2000 |
---|
Keywords: | kbCodeSnippet kbDSupport kbprb kbXBase KB268478 kbAudDeveloper |
---|
|