MdeModulePkg/TerminalDxe: Fix PCANSI mapping for TRIANGLE and ARROW
authorMichael D Kinney <michael.d.kinney@intel.com>
Tue, 7 Nov 2017 01:11:17 +0000 (17:11 -0800)
committerMichael D Kinney <michael.d.kinney@intel.com>
Mon, 13 Nov 2017 17:39:04 +0000 (09:39 -0800)
https://bugzilla.tianocore.org/show_bug.cgi?id=761

When a TerminalType is set to PCANSI, characters in the range 0x00
to 0x1F are control characters.  The mapping table for PCANSI maps
TRIANGLE glyphs, ARROW_UP glyph, and ARROW_DOWN glyph into this
control character range and that causes no characters to be
displayed by PCANSI compatible terminal emulators.

The mappings are updated so these glyphs are mapped to ANSI
characters in the range 0x20 to 0x7E.

GEOMETRICSHAPE_UP_TRIANGLE     '^'
GEOMETRICSHAPE_RIGHT_TRIANGLE  '>'
GEOMETRICSHAPE_DOWN_TRIANGLE   'v'
GEOMETRICSHAPE_LEFT_TRIANGLE   '<'
ARROW_UP                       '^'
ARROW_DOWN                     'v'

Cc: Star Zeng <star.zeng@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Ruiyu Ni <Ruiyu.ni@intel.com>
MdeModulePkg/Universal/Console/TerminalDxe/TerminalConOut.c

index e677a76..5a83431 100644 (file)
@@ -66,15 +66,15 @@ UNICODE_TO_CHAR  UnicodeToPcAnsiOrAscii[] = {
   { BLOCKELEMENT_FULL_BLOCK,            0xdb, L'*' },\r
   { BLOCKELEMENT_LIGHT_SHADE,           0xb0, L'+' },\r
 \r
-  { GEOMETRICSHAPE_UP_TRIANGLE,         0x1e, L'^' },\r
-  { GEOMETRICSHAPE_RIGHT_TRIANGLE,      0x10, L'>' },\r
-  { GEOMETRICSHAPE_DOWN_TRIANGLE,       0x1f, L'v' },\r
-  { GEOMETRICSHAPE_LEFT_TRIANGLE,       0x11, L'<' },\r
-\r
-  { ARROW_LEFT,                         0x3c, L'<' },\r
-  { ARROW_UP,                           0x18, L'^' },\r
-  { ARROW_RIGHT,                        0x3e, L'>' },\r
-  { ARROW_DOWN,                         0x19, L'v' },\r
+  { GEOMETRICSHAPE_UP_TRIANGLE,         '^', L'^' },\r
+  { GEOMETRICSHAPE_RIGHT_TRIANGLE,      '>', L'>' },\r
+  { GEOMETRICSHAPE_DOWN_TRIANGLE,       'v', L'v' },\r
+  { GEOMETRICSHAPE_LEFT_TRIANGLE,       '<', L'<' },\r
+\r
+  { ARROW_LEFT,                         '<', L'<' },\r
+  { ARROW_UP,                           '^', L'^' },\r
+  { ARROW_RIGHT,                        '>', L'>' },\r
+  { ARROW_DOWN,                         'v', L'v' },\r
 \r
   { 0x0000,                             0x00, L'\0' }\r
 };\r