From b024d16bc147e7eebcef0248e3a2a8cfec15973f Mon Sep 17 00:00:00 2001 From: Haoyu Qiu Date: Mon, 27 Sep 2021 19:10:32 +0800 Subject: Parse UTF-8 when getting path from resource UID --- core/io/resource_uid.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'core') diff --git a/core/io/resource_uid.cpp b/core/io/resource_uid.cpp index 97d683f415..290a71043c 100644 --- a/core/io/resource_uid.cpp +++ b/core/io/resource_uid.cpp @@ -126,8 +126,7 @@ String ResourceUID::get_id_path(ID p_id) const { MutexLock l(mutex); ERR_FAIL_COND_V(!unique_ids.has(p_id), String()); const CharString &cs = unique_ids[p_id].cs; - String s(cs.ptr()); - return s; + return String::utf8(cs.ptr()); } void ResourceUID::remove_id(ID p_id) { MutexLock l(mutex); -- cgit v1.2.3