1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-02 03:52:49 -05:00

Fixes to direct-to-font mode: I'd inadvertently enabled it for any

font whose encoding comes up as CS_NONE - but this is also true for
iso10646-1 fonts, since libcharset doesn't support wide-character
encodings! Hence UTF-8 cut and paste was enabled in ordinary modes,
but disabled in UTF-8 mode, which was a bit embarrassing. Now we
have a dedicated flag variable indicating direct-to-font mode.

[originally from svn r2425]
This commit is contained in:
Simon Tatham
2003-01-02 16:17:56 +00:00
parent 70458d6434
commit ea5be2db38
3 changed files with 36 additions and 14 deletions

View File

@ -101,9 +101,12 @@ int wc_to_mb(int codepage, int flags, wchar_t *wcstr, int wclen,
}
}
void init_ucs(int font_charset)
/*
* Return value is TRUE if pterm is to run in direct-to-font mode.
*/
int init_ucs(int font_charset)
{
int i;
int i, ret = 0;
/*
* In the platform-independent parts of the code, font_codepage
@ -131,6 +134,9 @@ void init_ucs(int font_charset)
if (line_codepage == CS_NONE)
line_codepage = font_charset;
if (line_codepage == CS_NONE)
ret = 1;
/*
* Set up unitab_line, by translating each individual character
* in the line codepage into Unicode.
@ -206,4 +212,6 @@ void init_ucs(int font_charset)
else
unitab_ctrl[i] = 0xFF;
}
return ret;
}