瀏覽代碼

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

git-svn-id: trunk@21491 -
michael 13 年之前
父節點
當前提交
efe5362670
共有 1 個文件被更改,包括 3 次插入0 次删除
  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);