aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPCopyTable.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPCopyTable.m')
-rw-r--r--Source/SPCopyTable.m7
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/SPCopyTable.m b/Source/SPCopyTable.m
index ed7b1d71..f2ad878f 100644
--- a/Source/SPCopyTable.m
+++ b/Source/SPCopyTable.m
@@ -197,7 +197,12 @@ static const NSInteger kBlobAsImageFile = 4;
[result appendFormat:@"%@\t", NSLocalizedString(@"(not loaded)", @"value shown for hidden blob and text fields")];
else if ([cellData isKindOfClass:[NSData class]]) {
if(withBlobHandling == kBlobInclude) {
- NSString *displayString = [[NSString alloc] initWithData:cellData encoding:[mySQLConnection stringEncoding]];
+ BOOL hexBlobs = [prefs boolForKey:SPDisplayBinaryDataAsHex];
+ NSString *displayString;
+ if (hexBlobs)
+ displayString = [[NSString alloc] initWithFormat:@"0x%@", [cellData dataToHexString]];
+ else
+ displayString = [[NSString alloc] initWithData:cellData encoding:[mySQLConnection stringEncoding]];
if (!displayString) displayString = [[NSString alloc] initWithData:cellData encoding:NSASCIIStringEncoding];
if (displayString) {
[result appendFormat:@"%@\t", displayString];