aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPCSVExporter.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2010-06-07 13:44:45 +0000
committerrowanbeentje <rowan@beent.je>2010-06-07 13:44:45 +0000
commit4c7cbdf882ad1e1bb1a5a11dc59dc53b90bee686 (patch)
treeffa901519ec9b970a76f6437feb39de65e04498a /Source/SPCSVExporter.m
parent42781adb6cfa7f01f3763aade1b5043995930756 (diff)
downloadsequelpro-4c7cbdf882ad1e1bb1a5a11dc59dc53b90bee686.tar.gz
sequelpro-4c7cbdf882ad1e1bb1a5a11dc59dc53b90bee686.tar.bz2
sequelpro-4c7cbdf882ad1e1bb1a5a11dc59dc53b90bee686.zip
A number of exporter improvements:
- Improve interface validation on the SQL view, including fixing no-content toggling - Fix the export of views to correctly construct placeholder tables and fix view syntax export (this addresses Issue #707) - Fix logic controlling Stored Procedure and Function export - fix hangs and allow correct export - Handle permission errors when retrieving Stored Pro/Function syntax - Improve export of linebreaks in CSV quoted cells for improved Excel compatibility - SQL export now retrieves table syntax as it progresses through the tables - more accurate progress bar and removes initial pause when exporting lots of tables - Alter filename construction to use centralised filename string: fixes end export Growl notification - Improve dump comments
Diffstat (limited to 'Source/SPCSVExporter.m')
-rw-r--r--Source/SPCSVExporter.m12
1 files changed, 5 insertions, 7 deletions
diff --git a/Source/SPCSVExporter.m b/Source/SPCSVExporter.m
index b465b4e2..49d6ade6 100644
--- a/Source/SPCSVExporter.m
+++ b/Source/SPCSVExporter.m
@@ -330,18 +330,16 @@
range:NSMakeRange(0, [csvCellString length])];
}
- // Escape occurrences of the line end character
- [csvCellString replaceOccurrencesOfString:[self csvLineEndingString]
- withString:escapedLineEndString
- options:NSLiteralSearch
- range:NSMakeRange(0, [csvCellString length])];
-
- // If the string isn't quoted or otherwise enclosed, escape occurrences of the field separators
+ // If the string isn't quoted or otherwise enclosed, escape occurrences of the field separators and line end character
if (quoteFieldSeparators || csvCellIsNumeric) {
[csvCellString replaceOccurrencesOfString:[self csvFieldSeparatorString]
withString:escapedFieldSeparatorString
options:NSLiteralSearch
range:NSMakeRange(0, [csvCellString length])];
+ [csvCellString replaceOccurrencesOfString:[self csvLineEndingString]
+ withString:escapedLineEndString
+ options:NSLiteralSearch
+ range:NSMakeRange(0, [csvCellString length])];
}
// Write out the cell data by appending strings - this is significantly faster than stringWithFormat.