diff options
Diffstat (limited to 'Source/SPDataImport.m')
-rw-r--r-- | Source/SPDataImport.m | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/SPDataImport.m b/Source/SPDataImport.m index ef92996a..b3d19f11 100644 --- a/Source/SPDataImport.m +++ b/Source/SPDataImport.m @@ -811,7 +811,12 @@ [csvParser setFieldTerminatorString:[importFieldsTerminatedField stringValue] convertDisplayStrings:YES]; [csvParser setLineTerminatorString:[importLinesTerminatedField stringValue] convertDisplayStrings:YES]; [csvParser setFieldQuoteString:[importFieldsEnclosedField stringValue] convertDisplayStrings:YES]; - [csvParser setEscapeString:[importFieldsEscapedField stringValue] convertDisplayStrings:YES]; + if ([[importFieldsEscapedField stringValue] isEqualToString:@"\\ or \""]) { + [csvParser setEscapeString:@"\\" convertDisplayStrings:NO]; + } else { + [csvParser setEscapeString:[importFieldsEscapedField stringValue] convertDisplayStrings:YES]; + [csvParser setEscapeStringsAreMatchedStrictly:YES]; + } [csvParser setNullReplacementString:[prefs objectForKey:SPNullValue]]; csvDataBuffer = [[NSMutableData alloc] init]; |