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
1 changed files with 2 additions and 1 deletions

View File

@ -324,7 +324,8 @@ void FConsoleWindow::AddText(const char* 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:
[NSFont systemFontOfSize:14.0f], NSFontAttributeName,