fix incorrect encoding parameter for quoted fields, add specs