aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2010-07-18 17:17:24 +0000
committerrowanbeentje <rowan@beent.je>2010-07-18 17:17:24 +0000
commit1638e26f0bb6da0c98fe9e39c4f9aadafe5f5cb1 (patch)
treeb7518a9f7fa79e4bdb9900f481a998fceb130c0b
parentad7cf0d9a34f5392193b55aab9121153391578d4 (diff)
downloadsequelpro-1638e26f0bb6da0c98fe9e39c4f9aadafe5f5cb1.tar.gz
sequelpro-1638e26f0bb6da0c98fe9e39c4f9aadafe5f5cb1.tar.bz2
sequelpro-1638e26f0bb6da0c98fe9e39c4f9aadafe5f5cb1.zip
- Fix table creation to use the selected encoding instead of always using utf8 (broken in r2325)
-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