Re: How to Parse a CSV formatted text file
On Sun, 08 Feb 2004 14:43:05 GMT, in comp.lang.c , Joe Wright
<joewwright@ear thlink.net> wrote:
[color=blue]
>Mark McIntyre wrote:[color=green]
>>
>>
>> yes, you need to handle that sort of stuff yourself. Personally I'd
>> use strtok on this sort of data, since embedded commas should not
>> exist. Consider the 1st line a special case.
>>[/color]
>I don't know of a 'Standard' defining .csv but this is normal output
>from Visual FoxPro..[/color]
snip example w/ embedded commas.
Interesting, but hte OP's data was employee numbers, phone numbers and
ward numbers. I find Occam's Razor to be efficient in such cases.
--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.angelfire.c om/ms3/bchambless0/welcome_to_clc. html>
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
On Sun, 08 Feb 2004 14:43:05 GMT, in comp.lang.c , Joe Wright
<joewwright@ear thlink.net> wrote:
[color=blue]
>Mark McIntyre wrote:[color=green]
>>
>>
>> yes, you need to handle that sort of stuff yourself. Personally I'd
>> use strtok on this sort of data, since embedded commas should not
>> exist. Consider the 1st line a special case.
>>[/color]
>I don't know of a 'Standard' defining .csv but this is normal output
>from Visual FoxPro..[/color]
snip example w/ embedded commas.
Interesting, but hte OP's data was employee numbers, phone numbers and
ward numbers. I find Occam's Razor to be efficient in such cases.
--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.angelfire.c om/ms3/bchambless0/welcome_to_clc. html>
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Comment