From 0c5431644d103728aa926896d9bbdf40ed8d5cc3 Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Tue, 5 Jul 2022 15:18:29 +0300 Subject: Allows parsing of invalid UTF-16 surrogates (can be encountered in Windows filenames) and some non-standard UTF-8 variants, makes Unicode parse errors more verbose. --- core/io/file_access.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'core/io/file_access.cpp') diff --git a/core/io/file_access.cpp b/core/io/file_access.cpp index 7d8da1b11c..da25f23917 100644 --- a/core/io/file_access.cpp +++ b/core/io/file_access.cpp @@ -388,9 +388,7 @@ String FileAccess::get_as_utf8_string() const { w[len] = 0; String s; - if (s.parse_utf8((const char *)w)) { - return String(); - } + s.parse_utf8((const char *)w); return s; } @@ -516,7 +514,6 @@ String FileAccess::get_pascal_string() { String ret; ret.parse_utf8(cs.ptr()); - return ret; } -- cgit v1.2.3