CSV files are very popular for storing tabular data because
they are simple textual files with a very few rules. This makes them very
interoperable because CSV readers and writers are relatively easy to implement.
Interoperability is, probably, the first reason why would someone choose to
save the data in CSV format.
Although rules for writing and reading CSV files, which are explained in next chapter, are relatively known and widely accepted, one
rule is an exception – determining a character that will be used as a
separator. CSV files, as the name Comma
Separated Values says, should
use comma [,] as the separator but there are many CSV files that use semicolon
[;] or horizontal tab [\t] as a separator.
So, in order to build generic CSV reader that will read CSV
file regardless of the separator, reader must first figure out which character
is used as a separator. This article gives one possible solution to this