From 652dc67e6ea2c38dfbfee56a821c2b05ca375d91 Mon Sep 17 00:00:00 2001 From: Markus Gans Date: Thu, 3 Jan 2019 21:38:19 +0100 Subject: [PATCH] Improved UTF-8 encoding for Cygwin --- src/fterm.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/fterm.cpp b/src/fterm.cpp index 12c0756c..9a2cb95d 100644 --- a/src/fterm.cpp +++ b/src/fterm.cpp @@ -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'`'; } //----------------------------------------------------------------------