From b0d803c0a853d1a5c5920d46549715d0dcf56661 Mon Sep 17 00:00:00 2001 From: michael Date: Sun, 31 Aug 2008 20:14:05 +0000 Subject: [PATCH] * Fixed bug #0011528, * 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 - --- packages/fcl-base/src/inifiles.pp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/fcl-base/src/inifiles.pp b/packages/fcl-base/src/inifiles.pp index 2039fa245b..753bf5bfb3 100644 --- a/packages/fcl-base/src/inifiles.pp +++ b/packages/fcl-base/src/inifiles.pp @@ -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;