Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2016-09

THashedStringList doesn't honour CaseSensitive?

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

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

Michael Van Canneyt
to Giuliano Colla
Giuliano Colla wrote 9 lines
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.

Giuliano Colla
to Michael Van Canneyt

Il 02/09/2016 14:20, Michael Van Canneyt ha scritto:

Show quoted text 14 lines
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