Deutsch   English   Français   Italiano  
<vahop1$2eavu$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Ed Morton <mortonspam@gmail.com>
Newsgroups: comp.lang.awk
Subject: Re: [gawk] Handling variants of CSV input data formats
Date: Mon, 26 Aug 2024 06:26:26 -0500
Organization: A noiseless patient Spider
Lines: 26
Message-ID: <vahop1$2eavu$1@dont-email.me>
References: <vaeh9m$1pfge$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 26 Aug 2024 13:26:25 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="e3b01412da6fb1d55e608471940d0d19";
	logging-data="2567166"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX182X3hOptNAiYp26o6KADlf"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:elo78PetXH6x8qRxpunpxVa9xOQ=
X-Antivirus: Avast (VPS 240826-0, 8/25/2024), Outbound message
Content-Language: en-US
X-Antivirus-Status: Clean
In-Reply-To: <vaeh9m$1pfge$1@dont-email.me>
Bytes: 2229

On 8/25/2024 1:00 AM, Janis Papanagnou wrote:
> Myself I'm usually not using CSV format(s), but recently I advertised
> GNU Awk (given that newer versions support CSV data processing) to a
> friend seeking CSV solutions.
> 
> I was quite astonished when I stumbled across a StackOverflow article
> about CSV processing with contemporary versions of GNU Awk and read
> that you are restricted to comma as separator and double quotes to
> enclose strings. The workarounds provided at SO were extremely clumsy.
> 
> Given that using ',', ';', '|' (or other delimiters) and also various
> types of quotes are just a lexical (no functional) difference I wonder
> whether it would be sensible to be able to define them, say, through
> setting a PROCINFO element?
> 
> Janis
> 
> https://stackoverflow.com/questions/45420535/whats-the-most-robust-way-to-efficiently-parse-csv-using-awk
> 

FYI gawk just inherited those behaviors (plus mandatory stripping of the 
quotes from quoted fields, see 
https://lists.gnu.org/archive/html/bug-gawk/2023-11/msg00018.html) from 
Kernighans awk.

	Ed.