Closed mvancanneyt closed 3 years ago
it is bad in 10.3, how about last 10.4 Sydney? http://docwiki.embarcadero.com/Libraries/Sydney/en/System.Character this tells we must use TCharacter.
can you test on 10.4 and give the patch? I don't have Delphi today.
I don't have 10.4
System.Character is not in the uses list. So of course that will not work... Not even for D2009. When I add System.Character to the uses list and change to {$IFDEF D_XE4} Result := Ch.ToLower; {$ELSE} Then it works.
I will try to get Delphi in next days. or give the pull-req, pls.
@andgineer Pls close.
The _uppercase and _lowercase functions no longer work in Delphi Rio (delphi 10.3).
{$IFDEF FPC} {$IFDEF UniCode} Result := UnicodeUpperCase(Ch)[1]; {$ELSE} Result := AnsiUpperCase(Ch)[1]; {$ENDIF} {$ELSE} {$IFDEF UniCode} {$IFDEF D_XE4} Result := Ch.ToUpper; {$ELSE}
The last line does not compile. I changed it to Result := UpperCase(Ch)[1] Which is of course horribly inefficient.
Similar in _lowercase {$IFDEF UniCode} {$IFDEF D_XE4} Result := LowerCase(Ch)[1]; {$ELSE}
There may be another (better) solution, but I am pressed for time so I didn't investigate further.