Improved UTF-8 encoding for Cygwin

This commit is contained in:
Markus Gans 2019-01-03 21:38:19 +01:00
parent c365f07298
commit 652dc67e6e
1 changed files with 12 additions and 0 deletions

View File

@ -1111,6 +1111,7 @@ void FTerm::init_cygwin_charmap()
if ( ! isCygwinTerminal() )
return;
// PC encoding changes
for (std::size_t i = 0; i <= fc::lastCharItem; i++ )
{
if ( fc::character[i][fc::UTF8] == fc::BlackUpPointingTriangle ) // ▲
@ -1130,6 +1131,17 @@ void FTerm::init_cygwin_charmap()
|| fc::character[i][fc::UTF8] == fc::SquareRoot ) // SquareRoot √
fc::character[i][fc::PC] = fc::character[i][fc::ASCII];
}
// General encoding changes
characterSub& sub_map = data->getCharSubstitutionMap();
sub_map[L''] = L'*';
sub_map[L''] = L'*';
sub_map[L''] = L'*';
sub_map[L''] = L'*';
sub_map[L''] = L'*';
sub_map[L''] = L'';
sub_map[L''] = L'x';
sub_map[L'ˣ'] = L'`';
}
//----------------------------------------------------------------------