diff options
author | Alvin Wong <alvinhochun@gmail.com> | 2024-07-07 02:45:00 +0800 |
---|---|---|
committer | Alvin Wong <alvinhochun@gmail.com> | 2024-07-07 02:46:41 +0800 |
commit | 5b3857e5f14bfe271e6f8791508b11ddd8e11f6e (patch) | |
tree | de53ea69db9b17f02a3fa95c25c88c01f6765577 | |
parent | b97110cd307e4d78e20bfafe5de6c082194b2cd6 (diff) | |
download | redot-engine-5b3857e5f14bfe271e6f8791508b11ddd8e11f6e.tar.gz |
Fix UTF-8 misintepreted as Latin-1 when logging to file
-rw-r--r-- | core/io/logger.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/io/logger.cpp b/core/io/logger.cpp index 1476b8ccac..a24277fe72 100644 --- a/core/io/logger.cpp +++ b/core/io/logger.cpp @@ -212,7 +212,7 @@ void RotatedFileLogger::logv(const char *p_format, va_list p_list, bool p_err) { // Strip ANSI escape codes (such as those inserted by `print_rich()`) // before writing to file, as text editors cannot display those // correctly. - file->store_string(strip_ansi_regex->sub(String(buf), "", true)); + file->store_string(strip_ansi_regex->sub(String::utf8(buf), "", true)); #else file->store_buffer((uint8_t *)buf, len); #endif // MODULE_REGEX_ENABLED |