Basic implementation of csv encoding.