From be1e3df4d0975f9bd8a7ad360baeda61b80d7a59 Mon Sep 17 00:00:00 2001 From: reuk Date: Thu, 18 Feb 2021 15:33:27 +0000 Subject: [PATCH] macOS: Be explicit about string encodings when logging assertions --- modules/juce_core/logging/juce_Logger.cpp | 2 +- modules/juce_core/native/juce_mac_Files.mm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/juce_core/logging/juce_Logger.cpp b/modules/juce_core/logging/juce_Logger.cpp index 555c954a5f..73f8c2520d 100644 --- a/modules/juce_core/logging/juce_Logger.cpp +++ b/modules/juce_core/logging/juce_Logger.cpp @@ -49,7 +49,7 @@ void Logger::writeToLog (const String& message) void JUCE_API JUCE_CALLTYPE logAssertion (const char* const filename, const int lineNum) noexcept { String m ("JUCE Assertion failure in "); - m << File::createFileWithoutCheckingPath (filename).getFileName() << ':' << lineNum; + m << File::createFileWithoutCheckingPath (CharPointer_UTF8 (filename)).getFileName() << ':' << lineNum; #if JUCE_LOG_ASSERTIONS Logger::writeToLog (m); diff --git a/modules/juce_core/native/juce_mac_Files.mm b/modules/juce_core/native/juce_mac_Files.mm index 7766283b72..1a4d075165 100644 --- a/modules/juce_core/native/juce_mac_Files.mm +++ b/modules/juce_core/native/juce_mac_Files.mm @@ -201,7 +201,7 @@ File File::getSpecialLocation (const SpecialLocationType type) case invokedExecutableFile: if (juce_argv != nullptr && juce_argc > 0) - return File::getCurrentWorkingDirectory().getChildFile (String (juce_argv[0])); + return File::getCurrentWorkingDirectory().getChildFile (CharPointer_UTF8 (juce_argv[0])); // deliberate fall-through... JUCE_FALLTHROUGH