mirror of https://github.com/FreeRDP/FreeRDP
fix Chinese title on mac
This commit is contained in:
parent
a691b48bc0
commit
5b44bc63e8
|
@ -67,8 +67,9 @@ void mac_set_view_size(rdpContext *context, MRDPView *view);
|
|||
|
||||
if (settings->WindowTitle && settings->WindowTitle[0])
|
||||
{
|
||||
winTitle = [[NSString alloc] initWithCString:settings->WindowTitle
|
||||
encoding:NSUTF8StringEncoding];
|
||||
winTitle = [[NSString alloc]
|
||||
initWithFormat:@"%@", [NSString stringWithCString:settings->WindowTitle
|
||||
encoding:NSUTF8StringEncoding]];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -132,7 +133,7 @@ void mac_set_view_size(rdpContext *context, MRDPView *view);
|
|||
if ([str isEqualToString:@"-NSDocumentRevisionsDebugMode"])
|
||||
continue;
|
||||
|
||||
length = (int)([str length] + 1);
|
||||
length = (int)([str lengthOfBytesUsingEncoding:NSUTF8StringEncoding] + 1);
|
||||
cptr = (char *)malloc(length);
|
||||
sprintf_s(cptr, length, "%s", [str UTF8String]);
|
||||
context->argv[i++] = cptr;
|
||||
|
|
Loading…
Reference in New Issue