* StripQuotes now also does single quotes.
* Note that for TMemIniFile the previous behaviour (StripQuotes=False) is kept, which
  is Delphi compatible.

git-svn-id: trunk@11674 -
This commit is contained in:
michael 2008-08-31 20:14:05 +00:00
parent 46f9928054
commit b0d803c0a8

View File

@ -620,6 +620,8 @@ constructor TIniFile.Create(const AFileName: string; AEscapeLineFeeds : Boolean
var
slLines: TStringList;
begin
If Not (self is TMemIniFile) then
StripQuotes:=True;
inherited Create(AFileName,AEscapeLineFeeds);
FStream := nil;
slLines := TStringList.Create;
@ -730,7 +732,7 @@ begin
// Joost, 2-jan-2007: The check (J>1) is there for the case that
// the value consist of a single double-quote character. (see
// mantis bug 6555)
If (J>1) and (sValue[1]='"') and (sValue[J]='"') then
If (J>1) and ((sValue[1] in ['"','''']) and (sValue[J]=sValue[1])) then
sValue:=Copy(sValue,2,J-2);
end;
end;