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:
4
ldisc.c
4
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];
|
||||
|
Reference in New Issue
Block a user