Procházet zdrojové kódy

* Fixed bug #19376: when quoting, quote character should be doubled

git-svn-id: trunk@21491 -
michael před 13 roky
rodič
revize
efe5362670
1 změnil soubory, kde provedl 3 přidání a 0 odebrání
  1. 3 0
      packages/fcl-db/src/sdf/sdfdata.pp

+ 3 - 0
packages/fcl-db/src/sdf/sdfdata.pp

@@ -1054,7 +1054,10 @@ begin
     // Check for any delimiters occurring in field text
     if ((not QuoteMe) and (StrScan(PChar(Str), FDelimiter) <> nil)) then QuoteMe:=true;
     if (QuoteMe) then
+      begin
+      Str:=Stringreplace(Str,QuoteDelimiter,QuoteDelimiter+QuoteDelimiter,[rfReplaceAll]);
       Str := QuoteDelimiter + Str + QuoteDelimiter;
+      end;
     Result := Result + Str + FDelimiter;
   end;
   p := Length(Result);