Skip to main content.
home | support | download

Back to List Archive

Re: Question on delimiter for -x output format...

From: <moseley(at)>
Date: Thu Nov 13 2003 - 06:54:17 GMT
On Wed, Nov 12, 2003 at 05:33:06PM -0800, David Wood wrote:
> In moving from swish-e version 2.1 to 2.4.0-pr4, I noticed a slight change 
> in how -x behaves.  In this example:
> -x 
> \'<swishrank>\"<swishdocpath>\"<swishtitle>\"<swishdocsize>\"<swishlastmodified 
> fmt=\"%m/%d/%Y\">\n\'
> double quote chars are serving as field separators.  This was a good choice 
> with swish-e version 2.1, because if any of the actual data contained 
> double quote chars, they got swapped to single quote chars.  It looks like 
> 2.4 doesn't do this anymore; is that right?

I don't remember it doing that.  I also can't find 2.1 on the swish-e 
web site, so I downloaded 2.2 and it doesn't do that.

moseley@laptop:~/swish-e-2.2$ ls file*

moseley@laptop:~/swish-e-2.2$ swish-e -w not dsakskj -x '"<swishdocpath>"\n' -H0

Before there was -x there was a hard-coded output generation and that I 
believe used to print &quot; if a double-quote was found.  At some point 
after -x feature was added I replaced that code with just a default -x 
pattern to match the old non -x output.  But that doesn't replace " with 
&quot; -- swish-e doesn't know that it's output will be HTML so it 
shouldn't be writing entities.

>  If so, is there another good 
> solution out there to the timeless problem of "pick a field separator that 
> won't show up in your data"?

What about \t?  Or multiple chars 


Use SWISH::API if you don't want to worry about delimiters.

Bill Moseley
Received on Thu Nov 13 06:54:25 2003