mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-23 15:09:24 -05:00
Fix UTF-8 flag checks in the Windows conio system.
Having constructed a conio object with its own 'utf8' flag, we should be checking that flag at time of use rather than the global conio_use_utf8 (which was already taken into account at setup time). Otherwise we miss the whole point, which is that without the override flag turning off UTF-8, _some_ uses of the system should use the default code page and not UTF-8.
This commit is contained in:
parent
8cf372d4a2
commit
d22ccbac6f
@ -143,7 +143,7 @@ static void console_write(BinarySink *bs, const void *data, size_t len)
|
|||||||
{
|
{
|
||||||
ConsoleIO *conio = BinarySink_DOWNCAST(bs, ConsoleIO);
|
ConsoleIO *conio = BinarySink_DOWNCAST(bs, ConsoleIO);
|
||||||
|
|
||||||
if (conio_use_utf8) {
|
if (conio->utf8) {
|
||||||
/*
|
/*
|
||||||
* Convert the UTF-8 input into a wide string.
|
* Convert the UTF-8 input into a wide string.
|
||||||
*/
|
*/
|
||||||
@ -220,7 +220,7 @@ static bool console_read_line_to_strbuf(ConsoleIO *conio, bool echo,
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (conio_use_utf8) {
|
if (conio->utf8) {
|
||||||
wchar_t wbuf[4096];
|
wchar_t wbuf[4096];
|
||||||
size_t wlen;
|
size_t wlen;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user