At least for the Microsoft Office Version on Windows I used some years ago, I were able to specify some things when exporting or importing CSV, like line-endings and field separator. Perhaps this is possible on the MacOS version as well?
@NobbZ I am quite sure there are workarounds even for the customer. I could go and run sed to fix files as well. But CSV interfaces are a pain by definition. I had a customer that produced CSV with SQL that he never checked (quoting when delimeter is part of the text). So no point to make things more painful
You are probably right. German Wikipedia says: Mac OS Classic, Apple II, C64 uses CR as line break.
But it seems to be an issue with Excel 2008/2011 that still uses this line breaks.
And yes - you are right - it is really a f*ck with CSV and Excel
Lol, yeah I have a Win10 notebook, all it does is gather dust sitting in my locked cabinet. I can get more work done using my phone and bluetooth keyboard than I can that thing. ^.^
Well, Desk IT (they manage the local desktops, build desks, etc… etc… I work in the Server IT area) comes around every 3 months freaking out because it has not been turned on in 3 months, their tracking system freaks out when something does not ‘phone home’ at least once every 3 months, which of course it cannot do if it is not even turned on… So they just turn it on for a moment after I unlock the cabinet, then turn it off and leave again for 3 months, so I lock the cabinet again… >.>
Yeah, its what Mac OS 9 used, support for which is basically the kernel of Excel for Mac. I’ve been banging my head against their version of CSV export for years now.
I’ll have to go dig up some code but i think what I do is a regex replacement on \r\n? to \r\n. It looks like yours is maybe better if you’re trying to stream it? I know I’m reading in the whole file to deal with the issue.
You might want to also verify your code still works with UTF8 characters—i’ve had weird issues crop up there as well when receiving input from users with international character sets. Its kind of hard to confirm because I’m like 3 stops down the line from the source, but its like something non-UTF8 gets stored by an upstream processor as UTF8 which apparently Works On Their Machine™ but causes headaches downstream.