chadderuski:
One open question: Are there any drawback/advantages to CVS over Tab delimited? Thinking foreign character set support, punctuation, etc...
-cj
It does support all punctuation. You should be able to use any characters you want, including returns and tabs and quotes. Nothing is converted to <br> in the description. I did that because ZenCart has a textarea for the description field.
A couple details on csv:
Usually everything is separated by a comma. Encapsulation (quotes) is usually only required when a special character is used, such as a separating or encapsulation character.
A line containing the following items:
entery one
second, item
"i am" quoted"
123.32
Would look like this:
entery one,"second, item",,"""i am"" quoted""",123.32
Quotes are doubled up if used and surrounded by quotes.
As long as the files are opened in a spreadsheet editor that will save as CSV, it should all be taken care of. That's just how it would look like if you opened it with notepad.
For the special case of froogle, I just have it check if it's froogle, if so, change delimination to "\t" (tab) and encapsulation to " " (space). The spaces won't interfere with anything, the php csv function just doesn't allow no character listed for encapsulation.
I was also thinking about the auto splitting feature and its purpose. Last night I had been up for a while so hadn't realized this. I was thinking the splitting feature was to prevent upload timeouts, but if that was the case, it would timeout before it even finished uploading the original file to split. That's why I added the max_input_time change at the beginning. But that wasn't the purpose at all. And ini_set might not work for everyone.
It was to prevent script timeouts, which is really simple to get around. It's really laughable that so much programing went into that when all the original programmer needed to go was add the set_time_limit. WOW.
So in this attached version, I removed everything that has to do with the splitting, which is like 4 pages of code.
Another note: if you see a tiny little box with a "?" in it in Excel next to your line feeds, it's ok. Linefeeds saved from the description field use \r\n, but excel only expects only \n. So it shows the \r as a square.