Looking for a C program to parse CSV

R

Richard Tobin

Mabden said:
(see how I used plz instead of please to tie in a little humour with the
topicality - neat, huh?! Since you have no sense of humour

When two people disagree about a joke, it's not always the one who
thinks it funny who has the better sense of humour.

-- Richard
 
F

Flash Gordon

Mabden said:
There you go pissing on my parade, again. I think I made the ppl point.

That was not in the post Keith was replying to, which is not to say you
did not make it. However, it was not visible when Keith replied.
Why did you need to chime in with an insult to me?

I see no insult to you.
> It seems like you
can't stand to have a little humour injected into the conversation,
without putting on the brake.

From the first phrase in Keith's post it is obvious he did not believe
it was meant seriously.
> What content did your post bring to the
conversation, except as some kind of Mabden putdown?! Lay off Keith,

He was clarifying for anyone who did not realise it that it was not
serious, and clarifying what the actual situation is.

Stop assuming people are out to get you. I doubt that you are important
enough for any of us to care one way or another about you.
plz.

(see how I used plz instead of please to tie in a little humour with the
topicality - neat, huh?! Since you have no sense of humour [or
proportion] I thought I would point it out. Again, a little Zen in the
criticism might help as well. You could have said something like, "There
are basically no words for the way, but we use words to illustrate the
way." Much better.)

I've yet to see any instance, including your comment above, where Zen
has clarified anything. Stating things clearly as Keith did does clarify
things.
 
M

Mabden

Richard Tobin said:
When two people disagree about a joke, it's not always the one who
thinks it funny who has the better sense of humour.

When two people add no content it is twice the waste of time for
everyone in the world who has to read your comments. Try to post
something pertaining to the subject at hand (albeit, and off-topic one)
instead of whatever value you think you just added.

What does this have to do with parsing CSV files? Or grammar which was
the OT post I replied to?

Why not just STFU? Ego? Hubris? Again, like Keith's post, I ask what
content do you add for all to read, for all time? Believe me, I am not
worthy of your insults, just carry on and either add content or shut the
**** up. Telling me that my post is not funny, is not helping the world.

Here, I'll try to help Mr. Tobin and Mr. Thompson: "I admit I may say
something Off Topic sometimes!!! I may make a joke that falls flat!! I
may take a moment of your time that you will never recover!!! My bad!"

Are we done yet?
 
M

Mabden

Flash Gordon said:
perfectly point.

That was not in the post Keith was replying to, which is not to say you
did not make it. However, it was not visible when Keith replied.

I made the "Limey" remark, and (I may be wrong, but) I believe that is
the genesis of his email, and Richard got in between. If I am wrong then
I agree I am too sensitive. I have come to be a little paranoid about
Mr. T because he seems to follow my posts with his own on this
newsgroup - usually in a negative way. (see "Keith Thompson is trolling
me", for more info - I'm trying to let it go and not mention it anymore
as he has others who champion him, but you asked)
I see no insult to you.

I agree I am too sensitive.
From the first phrase in Keith's post it is obvious he did not believe
it was meant seriously.

But, did anyone? Did Keith need to reassure the world that a post made
by ME (of all people) was the mandate of the newsgroup, and needed to be
immediately denied?! Were all the "Limey's" leaving the newsgroup
because I said we don't want none of those extra U's in words?!

I believe in Keith's country "humour" is spelled so that it doesn't
involve "YOU" (for Keith T's benefit [the guy has NO sense of humour]:
the joke is that other countries spell humour with an "extra" u, so I'm
joking that taking the "u" out of humor, takes the humor out of Keith
T - i.e.:"you"! See "u" sounds like "you" if you say them both out
loud...) Boy, it's hard to explain puns, nevermind jokes.

A woodpecker walks into a bar and says, "Where's the bar tender?" (Now,
you explain to KT why that's a joke, and how funny it is!)
He was clarifying for anyone who did not realise it that it was not
serious, and clarifying what the actual situation is.

You seriously wrote that? You mean you consider me the leader of all
that is c.l.c?!!
Stop assuming people are out to get you. I doubt that you are important
enough for any of us to care one way or another about you.
Duh.


I've yet to see any instance, including your comment above, where Zen
has clarified anything.

You read the words. You dismissed the words. You are unenlightened.
Again, Duh! Zen "clarifies" when one has attained enlightenment. I
cannot "Zen" you! Zap! Those words are thousands of years old and you
dismiss them without thought. Without thought.

Stating things clearly as Keith did does clarify things.

And reveal nothing. I already said we don't like pll who say, "ppl"
'round here. He echoed my words, in a derogatory way. Thank you for
nothing at all.
 
N

Neil Cerutti

I'm sorry to see you've gotten such worthless responses to your
request before I've managed to come across it.

It's hard to give good answers since csv is not standardized.
Using a simpler, non-modal data format would be much easier to
handle. I belive the OP should convert his Excel spreadsheet to
tab-delimited instead, saving himself the headache.

Having said that, Kernighan and Pike's _The Practice of
Programming_ contains an implementation of a csv file reader in
several languanges, including C.
 
M

Mabden

....and I helped! (reference to 1960's commercial)
It's hard to give good answers since csv is not standardized.
Using a simpler, non-modal data format would be much easier to
handle. I belive the OP should convert his Excel spreadsheet to
tab-delimited instead, saving himself the headache.

Indeed.

But has anyone noticed that the CSV appears wrong. Shouldn't it be
something like:

"a","b a"b a"",""b a,"","b"

NOT

"a,b","a""b","a"",""b","a,"",b" (as posted)

I haven't opened Excel to test this, but the posted code doesn't seem to
scan right.
 
W

websnarf

Mabden said:
...and I helped! (reference to 1960's commercial)


Indeed.

But has anyone noticed that the CSV appears wrong. Shouldn't it be
something like:

"a","b a"b a"",""b a,"","b"

NOT

"a,b","a""b","a"",""b","a,"",b" (as posted)

I haven't opened Excel to test this, but the posted code doesn't seem to
scan right.

No, the original posting is correct. You need to put quotes around
anything that contains a CR/LF, non-trimmed leading or trailing
whitespace, a comma (,) or a double quote (") character. In addition
any " characters in the data are always doubled up in order to keep the
parsing simplistic. Furthermore the quotes must be around the entire
entry.

This allows CSVs to hold fully arbitrary binary data, including text
with their own control and escape characters with no problems.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top