X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/a5f3e637bc3925f7c68ab0f3895408bb70154b13..4eeb7d098fc3c6fb29a4ba0da78edbf83f88dce1:/ldisc.c diff --git a/ldisc.c b/ldisc.c index b307d4e1..48fbe172 100644 --- a/ldisc.c +++ b/ldisc.c @@ -28,7 +28,7 @@ static int term_buflen = 0, term_bufsiz = 0, term_quotenext = 0; static int plen(unsigned char c) { - if ((c >= 32 && c <= 126) || (c >= 160)) + if ((c >= 32 && c <= 126) || (c >= 160 && !utf)) return 1; else if (c < 128) return 2; /* ^x for some x */ @@ -38,7 +38,7 @@ static int plen(unsigned char c) static void pwrite(unsigned char c) { - if ((c >= 32 && c <= 126) || (c >= 160)) { + if ((c >= 32 && c <= 126) || (c >= 160 && !utf)) { c_write(&c, 1); } else if (c < 128) { char cc[2];