File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
src/FirebirdSql.Data.FirebirdClient/Services Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change 1515
1616//$Authors = Jiri Cincura (jiri@cincura.net)
1717
18- using System ;
19- using System . Collections . Generic ;
2018using System . Globalization ;
21- using System . Linq ;
22- using System . Text ;
2319
2420namespace FirebirdSql . Data . Services ;
2521
@@ -32,7 +28,12 @@ protected static string WriteBoolValue(bool b)
3228
3329 protected static string WriteString ( string s )
3430 {
35- return string . Format ( "'{0}'" , s ) ;
31+ s = s
32+ . Replace ( "{" , "{{" )
33+ . Replace ( "}" , "}}" )
34+ . Replace ( @"\" , @"\\" )
35+ . Replace ( "\" " , "\\ \" " ) ;
36+ return string . Format ( "\" {0}\" " , s ) ;
3637 }
3738
3839 protected static string WriteNumber ( int i )
@@ -42,6 +43,6 @@ protected static string WriteNumber(int i)
4243
4344 protected static string WriteRegEx ( string re )
4445 {
45- return WriteString ( re . Replace ( @"\" , @"\\" ) . Replace ( "'" , @"\'" ) ) ;
46+ return WriteString ( re ) ;
4647 }
4748}
You can’t perform that action at this time.
0 commit comments