From c69e0d16bc8adbe3d984f4f9953412986ed02791 Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Thu, 6 Jan 2022 11:34:10 +0200 Subject: Fix multiple missing UTF-8 decoding. --- core/io/file_access_zip.cpp | 2 +- core/io/resource.cpp | 4 ++-- core/os/os.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'core') diff --git a/core/io/file_access_zip.cpp b/core/io/file_access_zip.cpp index d90a0c9110..6347862775 100644 --- a/core/io/file_access_zip.cpp +++ b/core/io/file_access_zip.cpp @@ -189,7 +189,7 @@ bool ZipArchive::try_open_pack(const String &p_path, bool p_replace_files, uint6 f.package = pkg_num; unzGetFilePos(zfile, &f.file_pos); - String fname = String("res://") + filename_inzip; + String fname = String("res://") + String::utf8(filename_inzip); files[fname] = f; uint8_t md5[16] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; diff --git a/core/io/resource.cpp b/core/io/resource.cpp index 311d71638b..66d5c54b53 100644 --- a/core/io/resource.cpp +++ b/core/io/resource.cpp @@ -520,8 +520,8 @@ void ResourceCache::dump(const char *p_file, bool p_short) { FileAccess *f = nullptr; if (p_file) { - f = FileAccess::open(p_file, FileAccess::WRITE); - ERR_FAIL_COND_MSG(!f, "Cannot create file at path '" + String(p_file) + "'."); + f = FileAccess::open(String::utf8(p_file), FileAccess::WRITE); + ERR_FAIL_COND_MSG(!f, "Cannot create file at path '" + String::utf8(p_file) + "'."); } const String *K = nullptr; diff --git a/core/os/os.cpp b/core/os/os.cpp index 506e968bf6..0032e8e4bc 100644 --- a/core/os/os.cpp +++ b/core/os/os.cpp @@ -346,7 +346,7 @@ String OS::get_model_name() const { } void OS::set_cmdline(const char *p_execpath, const List &p_args) { - _execpath = p_execpath; + _execpath = String::utf8(p_execpath); _cmdline = p_args; } -- cgit v1.2.3