1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-03 12:32:47 -05:00

RDB's Unicode patch. Fonts are now used in Unicode mode where

possible and we have a single unified means of trying to display any
Unicode code point. Instead of the various ad-hoc translation modes
we had before, we now have a single `codepage' option which allows
us to treat the incoming (and outgoing) text as any given character
set, and locally we map that to Unicode and back.

[originally from svn r1110]
This commit is contained in:
Simon Tatham
2001-05-10 08:34:20 +00:00
parent e001f1533e
commit 26f1085038
10 changed files with 2617 additions and 965 deletions

View File

@ -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];