What seperator to use when creating csv of unknown contents
As Tim already stated, a correct CSV file should quote any field that contains characters which are used as field (mostly comma or semikolon) or line separaters (mostly \n or \r\n) in the CSV file.
If you don't want to check the contens you can just quote all fields. Any good CSV import engine should be alright with that.
I'm trying to make a function that takes a picture of a table and converts that into a csv. The picture of the table could contain commas if it was say a bank statement i.e. $3,000. So what separator should I use when creating arbitrary csv document since the standard comma seperator would be confused with the commas in the contents of the csv when excel tries to read it.