[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnucap-devel] parameter case sensitivity

From: al davis
Subject: Re: [Gnucap-devel] parameter case sensitivity
Date: Fri, 4 Nov 2016 22:06:30 -0400

On Thu, 3 Nov 2016 17:55:10 +0100
Felix Salfelder <address@hidden> wrote:
(example of a case-sensitivity issue, where the file switches back and
forth between sensitive and insensitive modes)

I know .. it isn't perfect.  There is a known issue going back and
forth between modes.

CP/M and early MS-DOS with FAT had this problem too.  I think FAT still
has somewhat of a problem here.

The actual implementation is approximately as follows .....

A lot of stuff uses std::map, which is internally sorted.  In
insensitive mode, strings are converted to lower case prior to storage.

In insensitive mode, strings are converted to lower case for comparison.

The problem ..  in std::map, the sort would be different depending on
mode, so sometimes after flipping modes, it can't be found, or can be
found with case different from what it was.

Specific cases ....

Sensitive first, then insensitive ..

A symbol with CAPS is not converted to lower for storage as
case-sensitive, then can't be found because insensitive converts the
search string to lower, which doesn't match by internal test in

Insensitive first, then sensitive ..

A symbol with CAPS is converted to lower for storage, then in
case-sensitive mode is only seen all lower case.

I am not sure what the solution is.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]