diff options
author | Bibiko <bibiko@eva.mpg.de> | 2009-10-29 15:08:52 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2009-10-29 15:08:52 +0000 |
commit | c965c29b6ccf39a96a192f5c4bfffa2c0620cefc (patch) | |
tree | ce050064795b51b7626b693225d21708884ac0f6 /Source/TableDump.m | |
parent | a6c30d2c54b270b95b1abc59efef42b97174ed12 (diff) | |
download | sequelpro-c965c29b6ccf39a96a192f5c4bfffa2c0620cefc.tar.gz sequelpro-c965c29b6ccf39a96a192f5c4bfffa2c0620cefc.tar.bz2 sequelpro-c965c29b6ccf39a96a192f5c4bfffa2c0620cefc.zip |
• as default add the UTF-8 BOM (byte order marker) \xEFBBBF to a MySQL dump file
- this should simplify the loading of such a file in other text editors
- to avoid the writing of that BOM one can add to Sequel Pro's preference plist the boolean key “NoBOMforSQLdumpFile” and set it to YES
Note: If it turns out that this BOM causes problems one could add a checkbox for it to the NSSavePanel for instance later on.
Diffstat (limited to 'Source/TableDump.m')
-rw-r--r-- | Source/TableDump.m | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/TableDump.m b/Source/TableDump.m index abb2e258..99311518 100644 --- a/Source/TableDump.m +++ b/Source/TableDump.m @@ -1300,8 +1300,12 @@ } } + + // If NoBOMforSQLdumpFile is not set to YES write the UTF-8 Byte Order Marker + [metaString setString:([prefs boolForKey:SPNoBOMforSQLdumpFile]) ? @"" : @"\xef\xbb\xbf"]; + // Add the dump header to the dump file. - [metaString setString:@"# Sequel Pro dump\n"]; + [metaString appendString:@"# Sequel Pro dump\n"]; [metaString appendString:[NSString stringWithFormat:@"# Version %@\n", [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]]]; [metaString appendString:@"# http://code.google.com/p/sequel-pro\n#\n"]; |