From 7b4be7a61fff578dbc3bc6ea0b72cb681c841630 Mon Sep 17 00:00:00 2001 From: Bibiko Date: Wed, 7 Oct 2009 11:01:31 +0000 Subject: =?UTF-8?q?=E2=80=A2=20fixed=20bug=20for=20CSV=20import=20-=20now?= =?UTF-8?q?=20the=20parser=20will=20be=20initialized=20by=20the=20import?= =?UTF-8?q?=20dialog's=20settings=20(was=20unintentionally=20deleted)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/TableDump.m | 8 ++++++++ 1 file changed, 8 insertions(+) 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) { -- cgit v1.2.3