Windows® and the UNIX systems observe different conventions when writing line terminations in text files. UNIX® utilities and applications typically terminate lines with a single <LF> (line feed, or new line) character; Windows utilities and applications terminate lines with a two-character <CR><LF> (carriage return, line feed) character sequence. Some Windows applications can read and display files in either format, some Windows applications always write files using <CR><LF> format, and some Windows applications can be configured to determine which format to use.
These different conventions can create problems in text files that are edited on both Windows and the UNIX systems platforms. For example, a file that contains
abc
def
ghi
would look like this if it were created by a Windows editor such as Notepad and read by a UNIX editor such as vi:
abc^M
def^M
ghi^M
The UNIX text editor renders the <CR> character as ^M. The same file would look like this if it were created by the UNIX editor and read by the Windows editor:
abcdef
ghi
To better support parallel development in mixed environments, a text mode setting for views is provided that controls how line terminators are handled when text files are presented to applications.
Each ClearCase view is created with a text mode (line termination) setting that specifies how it handles line terminator sequences. This setting applies only to file elements whose element type is text_file or a subtype of type text_file. You must specify a view text mode when you create the view. You cannot change it after the view has been created.
The following line termination settings are supported by the View Creation wizard:
No policy is enforced that governs access to VOBs based on a view's text mode. A user who edits a file in a view that has the "wrong" text-mode configuration can cause problems for other users who need to edit that file. Sites with both Windows and UNIX development platforms need to adopt a policy that allows users of the primary development platform to create views in transparent text mode and that limits the use of strip_cr or insert_cr text modes to those platforms that require different line-termination conventions. If the majority of developers are editing text files on the UNIX systems, UNIX clients need to use views created in transparent text mode. Windows clients should use views created in insert_cr text mode. If the majority of developers are editing text files on Windows, Windows clients need to use views created in transparent text mode. UNIX clients need to use views created in strip_cr text mode.
Regardless of the policy your project adopts, it is important to maintain a consistent combination of client platform, view text mode, and element. For example, if a user on a UNIX system creates a version of an element in a view that has a strip_cr or insert_cr text mode and another user on a UNIX system creates a version of the same element in a transparent text mode view, the two versions will be difficult to compare or merge.