aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTablesList.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPTablesList.m')
-rw-r--r--Source/SPTablesList.m3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/SPTablesList.m b/Source/SPTablesList.m
index eeda411d..9e74e9d2 100644
--- a/Source/SPTablesList.m
+++ b/Source/SPTablesList.m
@@ -2067,7 +2067,8 @@
// If there is an encoding selected other than the default we must specify it in CREATE TABLE statement
if ([tableEncodingButton indexOfSelectedItem] > 0) {
NSString *encodingName = [[tableEncodingButton title] stringByMatching:@"\\((.*)\\)" capture:1L];
- charSetStatement = [NSString stringWithFormat:@"DEFAULT CHARACTER SET %@", [[tableDocumentInstance mysqlEncodingFromEncodingTag:encodingName] backtickQuotedString]];
+ if (!encodingName) encodingName = @"utf8";
+ charSetStatement = [NSString stringWithFormat:@"DEFAULT CHARACTER SET %@", [encodingName backtickQuotedString]];
}
// If there is a type selected other than the default we must specify it in CREATE TABLE statement