@@ -24,10 +24,11 @@ #include #import "OFObject.h" #import "OFArray.h" +#import "OFSystemInfo.h" #import "OFTimer.h" #import "OFRunLoop.h" #import "OFThread.h" #import "OFAllocFailedException.h" @@ -97,21 +98,22 @@ static void uncaughtExceptionHandler(id exception) { OFString *description = [exception description]; OFArray *backtrace = nil; + of_string_encoding_t encoding = [OFSystemInfo native8BitEncoding]; fprintf(stderr, "\nRuntime error: Unhandled exception:\n%s\n", - [description cStringWithEncoding: [OFString nativeOSEncoding]]); + [description cStringWithEncoding: encoding]); if ([exception respondsToSelector: @selector(backtrace)]) backtrace = [exception backtrace]; if (backtrace != nil) { OFString *s = [backtrace componentsJoinedByString: @"\n "]; fprintf(stderr, "\nBacktrace:\n %s\n\n", - [s cStringWithEncoding: [OFString nativeOSEncoding]]); + [s cStringWithEncoding: encoding]); } abort(); } #endif @@ -200,11 +202,11 @@ const char* _NSPrintForDebugger(id object) { return [[object description] - cStringWithEncoding: [OFString nativeOSEncoding]]; + cStringWithEncoding: [OFSystemInfo native8BitEncoding]]; } /* References for static linking */ void _references_to_categories_of_OFObject(void) {