diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/TableDump.m | 8 | ||||
-rw-r--r-- | Source/sequel-pro_Prefix.pch | 8 |
2 files changed, 14 insertions, 2 deletions
diff --git a/Source/TableDump.m b/Source/TableDump.m index ff79129d..03e98bd6 100644 --- a/Source/TableDump.m +++ b/Source/TableDump.m @@ -391,11 +391,14 @@ // Load file into string. For SQL imports, try UTF8 file encoding before the current encoding. if ([fileType isEqualToString:@"SQL"]) { - NSLog(@"Reading as utf8"); + NSLog(@"Attempting to read as utf8"); dumpFile = [SPSQLParser stringWithContentsOfFile:filename encoding:NSUTF8StringEncoding error:&errorStr]; - NSLog(dumpFile); + + // This will crash if dumpFile is big. + DLog(dumpFile); + if (errorStr) { importSQLAsUTF8 = NO; errorStr = nil; @@ -404,6 +407,7 @@ // If the SQL-as-UTF8 read failed, and for CSVs, use the current connection encoding. if (!importSQLAsUTF8 || [fileType isEqualToString:@"CSV"]) { + NSLog(@"Reading using connection encoding"); dumpFile = [SPSQLParser stringWithContentsOfFile:filename encoding:[CMMCPConnection encodingForMySQLEncoding:[[tableDocumentInstance connectionEncoding] UTF8String]] error:&errorStr]; diff --git a/Source/sequel-pro_Prefix.pch b/Source/sequel-pro_Prefix.pch index 8df1011d..0fa8023c 100644 --- a/Source/sequel-pro_Prefix.pch +++ b/Source/sequel-pro_Prefix.pch @@ -5,3 +5,11 @@ #ifdef __OBJC__ #import <Cocoa/Cocoa.h> #endif + +#ifdef DEBUG + #define DLog(...) NSLog(__VA_ARGS__) +#else + #define DLog(...) /* */ +#endif + +#define ALog(...) NSLog(__VA_ARGS__)
\ No newline at end of file |