void t4p::SqlCopyOptionsClass::Export(std::vector<wxString> values, wxTextOutputStream& stream) { wxString trueColumnDelim; if (ColumnDelim == wxT("\\t")) { trueColumnDelim = wxT("\t"); } else if (ColumnDelim == wxT("\\n")) { trueColumnDelim = wxT("\n"); } else if (ColumnDelim == wxT("\\f")) { trueColumnDelim = wxT("\f"); } else { trueColumnDelim = ColumnDelim; } size_t size = values.size(); for (size_t i = 0; i < size; ++i) { wxString val = values[i]; stream.WriteString(ColumnEnclosure); // write the cell value if (val == wxT("<NULL>")) { stream.WriteString(NullFiller); } else { for (size_t j = 0; j < val.length(); ++j) { if (val[j] == ColumnEnclosure) { stream.PutChar(wxT('\\')); stream.WriteString(ColumnEnclosure); } else { stream.PutChar(val[j]); } } } stream.WriteString(ColumnEnclosure); if (i < (size - 1)) { stream.WriteString(trueColumnDelim); } } }