From 8f386999a6f3cb57244972d579a938aab44afea8 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Mon, 30 Aug 2021 21:53:04 +0200 Subject: [PATCH] Change clipboard to UTF-8 on macOS (untested) --- source/Irrlicht/COSOperator.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/Irrlicht/COSOperator.cpp b/source/Irrlicht/COSOperator.cpp index 9ff4a0e..7824e67 100644 --- a/source/Irrlicht/COSOperator.cpp +++ b/source/Irrlicht/COSOperator.cpp @@ -92,7 +92,7 @@ void COSOperator::copyToClipboard(const c8 *text) const if ((text != NULL) && (strlen(text) > 0)) { - str = [NSString stringWithCString:text encoding:NSWindowsCP1252StringEncoding]; + str = [NSString stringWithCString:text encoding:NSUTF8StringEncoding]; board = [NSPasteboard generalPasteboard]; [board declareTypes:[NSArray arrayWithObject:NSStringPboardType] owner:NSApp]; [board setString:str forType:NSStringPboardType]; @@ -138,7 +138,7 @@ const c8* COSOperator::getTextFromClipboard() const str = [board stringForType:NSStringPboardType]; if (str != nil) - result = (char*)[str cStringUsingEncoding:NSWindowsCP1252StringEncoding]; + result = (char*)[str cStringUsingEncoding:NSUTF8StringEncoding]; return (result);