Use UTF-8 strings. Sometimes +[NSString stringWithUTF8String:] returns nil (I have no idea why), so use an empty string in that case.

This commit is contained in:
Steve Checkoway
2005-03-26 17:55:28 +00:00
parent 701d77ec51
commit da80435d0f
@@ -55,7 +55,9 @@ void DisposeOfCocoaWindow()
void SetCocoaWindowText(const char *s)
{
[text setString:[NSString stringWithCString:s]];
NSString *str = [NSString stringWithUTF8String:s];
[text setString:(str ? str : @"" )];
[text display];
}