Field Enclosing Character

A common scenario in ‘Delimited’ text files is that, the character that is used as a field or line separator is sometimes required to be part of the data. For example, a comma is frequently used as a field separator. But a comma is also often part of the data in a given field.

The field enclosing characters provide a mechanism to escape such characters which otherwise have a special meaning. The enclosing character field is defined by specifying a start character at the beginning and an end character at the end of the field. Both the start and the end enclosing character can be the same such as a double quote in this example: "field with , in data". Or they can be different such as the curly brackets in this example: {field with , in data}. You can also define a set of characters defining a pattern for start and end enclosing characters such as /* and */ in this example: /* field with, in data*/. Enclosing characters can in turn be part of the data if they are escaped dually. In this example a double quote is used both as an enclosing character and as part of the data: "field with "" in data". The double quote that is specified twice in succession is considered as part of the data. The resulting data after parsing is field with " in data.

Because of this Dual escaping, the start or end enclosing character cannot be defined using repeating characters. For example; you cannot choose a pattern such as ## or $$ as a start or end field enclosing character.

You can choose from a set of predefined start and end character. To define your own pattern of start and end characters, choose ‘Others’.

Presence of a start and end characters in a field is optional. You can use the enclosing characters to enclose all fields or only those fields that you require. Line Separator, Field Separator, Optional Value Indicators and the Field enclosing characters must be unique. They cannot be the same as any of the other four entities.