diff options
Diffstat (limited to 'Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Conversion.m')
-rw-r--r-- | Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Conversion.m | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Conversion.m b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Conversion.m index 676684ca..a7d293ea 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Conversion.m +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Conversion.m @@ -79,7 +79,7 @@ } /** - * Converts a C string to an NSString using the supplied encoding. + * Converts a C string to an NSString using the current connection encoding. * This method *will not* correctly preserve nul characters within c strings; instead * the first nul character within the string will be treated as the line ending. This * is unavoidable without supplying a string length, so this method should not be widely @@ -87,11 +87,15 @@ */ - (NSString *)_stringForCString:(const char *)cString { + return _stringForCStringWithEncoding(cString, stringEncoding); +} - // Don't try and convert null strings - if (cString == NULL) return nil; - - return [NSString stringWithCString:cString encoding:stringEncoding]; +/** + * @see _stringForCStringWithEncoding() + */ ++ (NSString *)_stringForCString:(const char *)cString usingEncoding:(NSStringEncoding)encoding +{ + return _stringForCStringWithEncoding(cString, encoding); } @end |