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