X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/blobdiff_plain/dc3c8261f1530c7926d4fded06a7ee58ec010b73..6ae18debc04dd13eade6226d481abaa532c1dedf:/unicode.c?ds=inline diff --git a/unicode.c b/unicode.c index c3e10519..e1740dad 100644 --- a/unicode.c +++ b/unicode.c @@ -474,6 +474,9 @@ void luni_send(wchar_t * widebuf, int len) /* UTF is a simple algorithm */ for (p = linebuffer, i = 0; i < len; i++) { wchar_t ch = widebuf[i]; + /* Windows wchar_t is UTF-16 */ + if ((ch&0xF800) == 0xD800) ch = '.'; + if (ch < 0x80) { *p++ = (char) (ch); } else if (ch < 0x800) {