I am generating a CSV file from Ruby. The problem is a column string will contain double quotes, single quotes. How can I escape these things?
"Mary had a little so called \"lamb\"","34","none"
"something is not \"right\"","23","none"
Each column is enclosed in double quotes followed by comma (and no space), and written into a file.
Additionally, how do you insert CSV into MySQL? Would you need to use something like PHP's mysql_real_escape_string?