Fix capturing non-ASCII output using wxExecute().

Explicitly use wxConvLibc with wxTextInputStream to make sure we correctly
decode non-ASCII data in the subprocess output.

This is a hack, the real solution would be to make wxTextInputStream work
properly with wxConvAuto.

See #14720.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74946 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2013-10-05 23:30:52 +00:00
parent 8155d71a7d
commit a05ae051d8
2 changed files with 5 additions and 1 deletions

View File

@ -598,6 +598,7 @@ wxMSW:
wxOSX:
- Improve handling of keyboard entry using IME (minoki).
- Fix capturing non-ASCII output using wxExecute().
- Fix column sorting UI in wxDataViewCtrl (Myrsloik).

View File

@ -630,7 +630,10 @@ static bool ReadAll(wxInputStream *is, wxArrayString& output)
// the stream could be already at EOF or in wxSTREAM_BROKEN_PIPE state
is->Reset();
wxTextInputStream tis(*is);
// 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", wxConvLibc);
for ( ;; )
{