Check of the termcap capability U8

This commit is contained in:
Markus Gans 2017-02-07 17:15:01 +01:00
parent 754a863cfe
commit 09021d9c0a
3 changed files with 12 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2017-02-07 Markus Gans <guru.mail@muenster.de>
* Uses termcap capability U8 to identify terminals that can't display
vt100 line-drawing in UTF-8 mode
2017-01-28 Markus Gans <guru.mail@muenster.de>
* Allow to change the focus out from FScrollView to another widget

View File

@ -95,6 +95,7 @@ bool FTermcap::automatic_right_margin = false;
bool FTermcap::eat_nl_glitch = false;
bool FTermcap::ansi_default_color = false;
bool FTermcap::osc_support = false;
bool FTermcap::no_utf8_acs_chars = false;
int FTermcap::max_color = 1;
uInt FTermcap::tabstop = 8;
uInt FTermcap::attr_without_color = 0;
@ -1298,6 +1299,9 @@ void FTerm::setEncoding (std::string enc)
{
std::map<std::string,fc::encoding>::const_iterator it;
if ( FTermcap::no_utf8_acs_chars && isUTF8() && enc == "VT100" )
enc = "UTF8";
// available encodings: "UTF8", "VT100", "PC" and "ASCII"
it = encoding_set->find(enc);
@ -2619,6 +2623,9 @@ void FTerm::init_termcaps()
// OSC = Esc + ']'
FTermcap::osc_support = tgetflag(const_cast<char*>("XT"));
// U8 is nonzero for terminals with no VT100 line-drawing in UTF-8 mode
FTermcap::no_utf8_acs_chars = bool(tgetnum(const_cast<char*>("U8")) != 0);
if ( isTeraTerm() )
FTermcap::eat_nl_glitch = true;

View File

@ -56,6 +56,7 @@ class FTermcap
static bool eat_nl_glitch;
static bool ansi_default_color;
static bool osc_support;
static bool no_utf8_acs_chars;
static int max_color;
static uInt tabstop;
static uInt attr_without_color;