Using UTF8 String for filepath and filename
This commit is contained in:
parent
b44371f4bf
commit
e759ce72b5
1 changed files with 2 additions and 5 deletions
|
@ -954,11 +954,8 @@ void NativeWindowMac::SetAspectRatio(double aspect_ratio,
|
||||||
}
|
}
|
||||||
|
|
||||||
void NativeWindowMac::PreviewFile(const std::string& filepath, const std::string& filename) {
|
void NativeWindowMac::PreviewFile(const std::string& filepath, const std::string& filename) {
|
||||||
NSString *path = [NSString stringWithCString:filepath.c_str()
|
NSString *path = [NSString stringWithUTF8String:filepath.c_str()];
|
||||||
encoding:[NSString defaultCStringEncoding]];
|
NSString *name = [NSString stringWithUTF8String:filename.c_str()];
|
||||||
|
|
||||||
NSString *name = [NSString stringWithCString:filename.c_str()
|
|
||||||
encoding:[NSString defaultCStringEncoding]];
|
|
||||||
|
|
||||||
[window_ previewFileAtPath:path withName:name];
|
[window_ previewFileAtPath:path withName:name];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue