aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2009-10-07 11:01:31 +0000
committerBibiko <bibiko@eva.mpg.de>2009-10-07 11:01:31 +0000
commit7b4be7a61fff578dbc3bc6ea0b72cb681c841630 (patch)
treee9df17f61888bd5c1bcb0ad1104cb0e9d15a3d6a /Source
parent267cdf7483a17b902d28c2b4e9ca136db9efd2bb (diff)
downloadsequelpro-7b4be7a61fff578dbc3bc6ea0b72cb681c841630.tar.gz
sequelpro-7b4be7a61fff578dbc3bc6ea0b72cb681c841630.tar.bz2
sequelpro-7b4be7a61fff578dbc3bc6ea0b72cb681c841630.zip
• fixed bug for CSV import
- now the parser will be initialized by the import dialog's settings (was unintentionally deleted)
Diffstat (limited to 'Source')
-rw-r--r--Source/TableDump.m8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/TableDump.m b/Source/TableDump.m
index 7a02964a..4bc867a8 100644
--- a/Source/TableDump.m
+++ b/Source/TableDump.m
@@ -763,6 +763,14 @@
// and send queries to the server. The loop is mainly to perform the first of these; the
// other two must therefore be performed where possible.
csvParser = [[SPCSVParser alloc] init];
+
+ // Take CSV import setting from accessory view
+ [csvParser setFieldTerminatorString:[importFieldsTerminatedField stringValue] convertDisplayStrings:YES];
+ [csvParser setLineTerminatorString:[importLinesTerminatedField stringValue] convertDisplayStrings:YES];
+ [csvParser setFieldQuoteString:[importFieldsEnclosedField stringValue] convertDisplayStrings:YES];
+ [csvParser setEscapeString:[importFieldsEscapedField stringValue] convertDisplayStrings:YES];
+ [csvParser setNullReplacementString:[prefs objectForKey:@"NullValue"]];
+
csvDataBuffer = [[NSMutableData alloc] init];
importPool = [[NSAutoreleasePool alloc] init];
while (1) {