Cygwin: pty: Add charset conversion for console apps in legacy PTY.
This commit is contained in:
parent
24554ab923
commit
b757a21d85
|
@ -3054,6 +3054,12 @@ fhandler_pty_master::pty_master_fwd_thread ()
|
||||||
mb_str_free (buf);
|
mb_str_free (buf);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
size_t nlen;
|
||||||
|
char *buf = convert_mb_str
|
||||||
|
(get_ttyp ()->term_code_page, &nlen, GetConsoleOutputCP (), ptr, wlen);
|
||||||
|
|
||||||
|
ptr = buf;
|
||||||
|
wlen = rlen = nlen;
|
||||||
acquire_output_mutex (INFINITE);
|
acquire_output_mutex (INFINITE);
|
||||||
while (rlen>0)
|
while (rlen>0)
|
||||||
{
|
{
|
||||||
|
@ -3066,6 +3072,7 @@ fhandler_pty_master::pty_master_fwd_thread ()
|
||||||
wlen = (rlen -= wlen);
|
wlen = (rlen -= wlen);
|
||||||
}
|
}
|
||||||
release_output_mutex ();
|
release_output_mutex ();
|
||||||
|
mb_str_free (buf);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue