THashedStringList doesn't honour CaseSensitive?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

THashedStringList doesn't honour CaseSensitive?

Giuliano Colla
In my application I stumbled into a problem with a search in a
HashedStringList: IndexOfName doesn't return the proper index if the
search string doesn't match the name case, even if CaseSensitive is set
to false.

For common sense and Delphi compatibility
(http://docwiki.embarcadero.com/Libraries/Berlin/en/System.IniFiles.THashedStringList_Properties)
CaseSensitive should be supported.

Am I doing something wrong, or it is an fpc missing feature?

Verified both with fpc 2.6.4 and fpc 3.0.0

Giuliano


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: THashedStringList doesn't honour CaseSensitive?

Michael Van Canneyt


On Fri, 2 Sep 2016, Giuliano Colla wrote:

> In my application I stumbled into a problem with a search in a
> HashedStringList: IndexOfName doesn't return the proper index if the search
> string doesn't match the name case, even if CaseSensitive is set to false.
>
> For common sense and Delphi compatibility
> (http://docwiki.embarcadero.com/Libraries/Berlin/en/System.IniFiles.THashedStringList_Properties)
> CaseSensitive should be supported.
>
> Am I doing something wrong, or it is an fpc missing feature?

Please report a bug.

Michael.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: THashedStringList doesn't honour CaseSensitive?

Giuliano Colla
Il 02/09/2016 14:20, Michael Van Canneyt ha scritto:
On Fri, 2 Sep 2016, Giuliano Colla wrote:

In my application I stumbled into a problem with a search in a HashedStringList: IndexOfName doesn't return the proper index if the search string doesn't match the name case, even if CaseSensitive is set to false.

For common sense and Delphi compatibility (http://docwiki.embarcadero.com/Libraries/Berlin/en/System.IniFiles.THashedStringList_Properties) CaseSensitive should be supported.

Am I doing something wrong, or it is an fpc missing feature?

Please report a bug.

Done:

http://bugs.freepascal.org/view.php?id=30568

I have attached a small patch which should fix the issue.

As a side issue, Delphi's TIniFiles, (at least in the CLX version which I checked), uses a THashedStringList for better efficiency. Once THashedStringList supports the CaseSensitive flag, it can be used in fpc too.

Giuliano



_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal