From e937c86893fbf9b0a37a90ac0549124296c15e05 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Sat, 4 Feb 2012 02:15:17 +0100 Subject: [PATCH] Added UTF-8 window title support for Cocooa. --- src/cocoa_window.m | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/cocoa_window.m b/src/cocoa_window.m index 3e94f541..264ba6ef 100644 --- a/src/cocoa_window.m +++ b/src/cocoa_window.m @@ -476,9 +476,7 @@ static GLboolean createWindow(_GLFWwindow* window, return GL_FALSE; } - [window->NS.window setTitle:[NSString stringWithCString:wndconfig->title - encoding:NSISOLatin1StringEncoding]]; - + [window->NS.window setTitle:[NSString stringWithUTF8String:wndconfig->title]]; [window->NS.window setContentView:[[GLFWContentView alloc] initWithGlfwWindow:window]]; [window->NS.window setDelegate:window->NS.delegate]; @@ -779,8 +777,7 @@ void _glfwPlatformCloseWindow(_GLFWwindow* window) void _glfwPlatformSetWindowTitle(_GLFWwindow* window, const char *title) { - [window->NS.window setTitle:[NSString stringWithCString:title - encoding:NSISOLatin1StringEncoding]]; + [window->NS.window setTitle:[NSString stringWithUTF8String:title]]; } //========================================================================