|
CsvTool 1.0B3 - User Guide and FAQ
Screenshots - More Details
CSV Rules for Input
- CsvTool works only with 8-byte characters. It doesn't handle UTF-8, Unicode, or any other multibyte character encoding.
- Input consists of a sequence of records, each of which is divided into one or more fields. The number of fields may vary from record to record.
- Any field that violates the rules below is erroneous, and any record that contains an erroneous field is erroneous. The treatment of erroneous fields and records varies with the processing step (e.g., the Format tab marks erroneous fields; the Export tab writes erroneous records to a separate file).
- Each record, including the last one, is followed by a Record Delimiter, which is one or two characters.
- Fields are separated by a Field Delimiter, which is a single character. Field Delimiters do not appear at the start or end of a record.
- Spaces (decimal 32) that precede or follow a Field Delimiter are ignored and are not considered to be part of the field.
- A field may be surrounded by Quote characters, which are not considered part of the field. Such a field is said to be quoted.
- The characters that would otherwise comprise a Field or Record Delimiter do not act as a delimiter if they appear in a quoted field. (This is the chief reason for quoting a field.) Thus, a field may consist of multiple text lines. A field that doesn't have to be quoted may be quoted nonetheless.
- Quote characters that appear in a quoted field must be escaped according to the Escape Rule specified for the entire input. There are two possible Escape Rules from which to choose: Backslash, in which escaped quote and backslash characters are preceded by a backslash, and Doubled Quote, in which escaped quote characters are doubled.
- Quote and backslash characters that do not appear in a quoted field are not escaped.
- Field and Record Delimiters and Quotes may be any characters from 0 through 255, although the three of them must be distinct. The quote character may also be set to None, in which case there is no quote character, and therefore no field is quoted.
- As a special case, the Record Delimiter may be set to a two-character sequence, either return-linefeed (used in DOS and Windows) or linefeed-return. No other characters may be used in two-character Record Delimiters.
CSV Rules for Output
- Field Delmiters are never preceded or followed by spaces.
- You can choose whether to always quote fields or to quote them only when necessary.
- The option None isn't allowed for the Quote character.
Screenshots - More Details
|