Restore wxConvAuto in wxTextInputStream used by wxExecute()

This reverts commit a05ae051d8 and allows
to correctly decode UTF-8 output of child processes again.

Also add a (disabled by default) test allowing to verify that this does
work now.

Closes #14720, #18382.
This commit is contained in:
Vadim Zeitlin
2019-04-21 20:09:13 +02:00
parent 731b3a804f
commit 7d3687f515
2 changed files with 26 additions and 8 deletions

View File

@@ -613,14 +613,7 @@ static bool ReadAll(wxInputStream *is, wxArrayString& output)
// the stream could be already at EOF or in wxSTREAM_BROKEN_PIPE state
is->Reset();
// Notice that wxTextInputStream doesn't work correctly with wxConvAuto
// currently, see #14720, so use the current locale conversion explicitly
// under assumption that any external program should be using it too.
wxTextInputStream tis(*is, " \t"
#if wxUSE_UNICODE
, wxConvLibc
#endif
);
wxTextInputStream tis(*is);
for ( ;; )
{