Text files are any text encoded file. Usually ASCII or UTF-8 as these are slightly more efficient on space than other text files. Text files are easily parsed and human readable but they loose accuracy as they do not record numerical values at their full precision. In addition there are many formats which are impossible to support completely automatically.
In the workbench 'dat' files are considered to be encoded as follows:
The file is ascii/utf-8
The header is a section at the start and starting with a # or are blank
The footer is a section at the end and starting with a #
The data lines consist only of numbers separated by whitespace, 2 columns or more.
The names of the data sets are defined in the last line of the header. They are separated by white space but if commas are used as well these will be stripped from the names. A single space without a comma is not included as data set names may contain spaces.
Example:
# Instrument: I20-XAS Date: Mon, 19 Jul 2010 13:54:16 BST
# Ring energy: 56.66749 GeV
# Initial ring current: 72.23874 mA
# Filling mode: 50.05388
# Wiggler gap selected: 0.00000 mm
#
# Other cmments here
# Energy I0 It Iref ln(I0/It)
6912.0000 134878.0 2040284.0 295077.5 -2.716
6912.0000 134878.0 2040284.0 295077.5 -2.716
6912.0000 134878.0 2040284.0 295077.5 -2.716
# etc.
This is clearer format and supported.