Text modes

Each view has a text mode 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 determine a view’s text mode when you create the view. You cannot change the text mode of a view after the view has been created.

A site default value stored in the HCL VersionVault registry determines which text mode is used when a new view is created. This value can be overridden on the command line and in GUIs that create views. For details about setting the default, see the setsite reference page.

You can create a view in one of three text modes:
  • transparent text mode. In a view created in transparent text mode, no line-terminator processing is performed. If no other site default is specified, views are always created in transparent text mode. To create a view in transparent text mode regardless of the site default, clear the Use interop (insert_cr) text mode check box in the Advanced options of the View Creation wizard, or use the –tmode transparent option to the mkview command.

    If all developers at your site use the same development platform or use tools that are compatible with either line-termination convention, all views must be created in transparent text mode.

  • insert_cr text mode. In a view created in insert_cr text mode, a <CR> character is inserted before every <LF> character. To create a view in insert_cr text mode, select the Use interop (insert_cr) text mode check box in the Advanced options of the View Creation wizard or use the –tmode insert_cr option to the mkview command.
  • strip_cr text mode. In a view created in strip_cr text mode, the <CR> character is stripped from every <CR><LF> sequence. To create a view in strip_cr text mode, use the –tmode strip_cr options to the mkview command. You cannot create a view in strip_cr mode from the View Creation Wizard.

In a snapshot view created in either insert_cr or strip_cr text mode, the <CR> characters are added or removed when the view is updated. In a dynamic view, the <CR> characters are added or removed when you open and read files. For both snapshot views and dynamic views, the <CR> manipulation is reversed (adding or removing <CR> characters as appropriate) during the checkin process.