SID-00339: Search stays casesensitive even with casesensitive="off"
| Status: |
Answered |
TWiki version: |
4.2.0 |
Perl version: |
|
| Category: |
CategorySearch |
Server OS: |
|
Last update: |
17 years ago |
I created a search mask to filter the project list of our company. I used a
%SEARCH{web="Xxxx" "(form.name= 'ProjectForm') etc. to search the field content of the relevant form. Works fine. The only and crucial error is: the search is casesensitive. I even included casesensitive="off" in the search string. The search remains casesensitive.
I need to have a caseinsensitive search as we use company specific tool names and unfortunately people have entered these names sometimes all in capitals.
--
HansPeterWaltisberg - 2009-05-28
Discussion and Answer
TWiki's
VarSEARCH is case insensitive by default. There is a
casesensitive="on" switch to turn it on.
It looks like something is wrong with your TWiki setup, namely with the
{RCS}{EgrepCmd} and
{RCS}{FgrepCmd} configure settings. Defaults are as follows:
$TWiki::cfg{RCS}{EgrepCmd} = '/bin/grep -E %CS{|-i}% %DET{|-l}% -H -- %TOKEN|U% %FILES|F%';
$TWiki::cfg{RCS}{FgrepCmd} = '/bin/grep -F %CS{|-i}% %DET{|-l}% -H -- %TOKEN|U% %FILES|F%';
In a
QuerySearch, you can compare case insensitive like this:
"(lc(form.name) = lc('ProjectForm'))"
--
PeterThoeny - 2009-05-28
thanks. great solution.
--
HansPeterWaltisberg - 2009-06-03
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.