Explorar o código

os: execute parse the command output from utf8

(cherry picked from commit 8a88637705ecf58a069b3ea631fee8501fd8e6f4)
Mateo Dev .59 %!s(int64=5) %!d(string=hai) anos
pai
achega
d6c94fd527
Modificáronse 2 ficheiros con 2 adicións e 2 borrados
  1. 1 1
      drivers/unix/os_unix.cpp
  2. 1 1
      platform/windows/os_windows.cpp

+ 1 - 1
drivers/unix/os_unix.cpp

@@ -310,7 +310,7 @@ Error OS_Unix::execute(const String &p_path, const List<String> &p_arguments, bo
 			if (p_pipe_mutex) {
 				p_pipe_mutex->lock();
 			}
-			(*r_pipe) += buf;
+			(*r_pipe) += String::utf8(buf);
 			if (p_pipe_mutex) {
 				p_pipe_mutex->unlock();
 			}

+ 1 - 1
platform/windows/os_windows.cpp

@@ -2713,7 +2713,7 @@ Error OS_Windows::execute(const String &p_path, const List<String> &p_arguments,
 			if (p_pipe_mutex) {
 				p_pipe_mutex->lock();
 			}
-			(*r_pipe) += buf;
+			(*r_pipe) += String::utf8(buf);
 			if (p_pipe_mutex) {
 				p_pipe_mutex->unlock();
 			}