Used ISO Latin 1 encoding for text in startup window on OS X

Attempts to output errors with bad characters encountered during text lumps parsing were failed miserably because of UTF-8 conversion
Example: loading of GZ-Models-r16.pk3 with GZDoom caused 'NSConcreteAttributedString initWithString:: nil value' exception
This commit is contained in:
alexey.lysiuk 2016-02-28 15:05:13 +02:00 committed by Christoph Oelckers
parent 243f59d96d
commit 0822485593

View file

@ -324,7 +324,8 @@ void FConsoleWindow::AddText(const char* message)
void FConsoleWindow::AddText(const PalEntry& color, const char* const message) void FConsoleWindow::AddText(const PalEntry& color, const char* const message)
{ {
NSString* const text = [NSString stringWithUTF8String:message]; NSString* const text = [NSString stringWithCString:message
encoding:NSISOLatin1StringEncoding];
NSDictionary* const attributes = [NSDictionary dictionaryWithObjectsAndKeys: NSDictionary* const attributes = [NSDictionary dictionaryWithObjectsAndKeys:
[NSFont systemFontOfSize:14.0f], NSFontAttributeName, [NSFont systemFontOfSize:14.0f], NSFontAttributeName,