diff options
author | rowanbeentje <rowan@beent.je> | 2010-07-18 17:17:24 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2010-07-18 17:17:24 +0000 |
commit | 1638e26f0bb6da0c98fe9e39c4f9aadafe5f5cb1 (patch) | |
tree | b7518a9f7fa79e4bdb9900f481a998fceb130c0b /Source | |
parent | ad7cf0d9a34f5392193b55aab9121153391578d4 (diff) | |
download | sequelpro-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)
Diffstat (limited to 'Source')
-rw-r--r-- | Source/SPTablesList.m | 3 |
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 |