Skip to main content.
home | support | download

Back to List Archive

Re: EncodeProperty breaks swishdocpaths with multiple spaces

From: <moseley(at)not-real.hank.org>
Date: Thu Jul 10 2003 - 17:14:40 GMT
> Hello,
> I am trying to index (with swish-e 2.2.3) a number of files that have
> multiple consecutive spaces in their names. EncodeProperty() replaces
> multiple spaces with just one,

Yes, that's very broken.  I thought it did that only when combining text
into a single property.  Either way, you are right that's very broken.
The idea was to compress space for descriptions (to make context displays
look better).
> I suspect the "if" statement at line 731 in docprop.c is incorrect:
>
>            if ( (int)((unsigned char)*source) <= (int)' ' )
>
> really should be:
>
>            if ( (int)((unsigned char)*source) < (int)' ' )

I suppose that's the best way, and then when displaying the property (like
with swish.cgi) compress multiple spaces.  (Well, I suppose HTML will do
that.)
The other option would be another config option to say to compress space
or not.  But that's another config options for something that really
should be handled in the display.

-- 
Bill Moseley
moseley@hank.org
Received on Thu Jul 10 17:14:55 2003