From ffc1fffd65eb95753985467dd9a2db002ebc49e1 Mon Sep 17 00:00:00 2001 From: Michael D Kinney Date: Mon, 6 Nov 2017 17:11:17 -0800 Subject: [PATCH] MdeModulePkg/TerminalDxe: Fix PCANSI mapping for TRIANGLE and ARROW 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 Cc: Eric Dong Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney Reviewed-by: Star Zeng Reviewed-by: Ruiyu Ni --- .../Console/TerminalDxe/TerminalConOut.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConOut.c b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConOut.c index e677a76e6b..5a8343162f 100644 --- a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConOut.c +++ b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConOut.c @@ -66,15 +66,15 @@ UNICODE_TO_CHAR UnicodeToPcAnsiOrAscii[] = { { BLOCKELEMENT_FULL_BLOCK, 0xdb, L'*' }, { BLOCKELEMENT_LIGHT_SHADE, 0xb0, L'+' }, - { GEOMETRICSHAPE_UP_TRIANGLE, 0x1e, L'^' }, - { GEOMETRICSHAPE_RIGHT_TRIANGLE, 0x10, L'>' }, - { GEOMETRICSHAPE_DOWN_TRIANGLE, 0x1f, L'v' }, - { GEOMETRICSHAPE_LEFT_TRIANGLE, 0x11, L'<' }, + { GEOMETRICSHAPE_UP_TRIANGLE, '^', L'^' }, + { GEOMETRICSHAPE_RIGHT_TRIANGLE, '>', L'>' }, + { GEOMETRICSHAPE_DOWN_TRIANGLE, 'v', L'v' }, + { GEOMETRICSHAPE_LEFT_TRIANGLE, '<', L'<' }, - { ARROW_LEFT, 0x3c, L'<' }, - { ARROW_UP, 0x18, L'^' }, - { ARROW_RIGHT, 0x3e, L'>' }, - { ARROW_DOWN, 0x19, L'v' }, + { ARROW_LEFT, '<', L'<' }, + { ARROW_UP, '^', L'^' }, + { ARROW_RIGHT, '>', L'>' }, + { ARROW_DOWN, 'v', L'v' }, { 0x0000, 0x00, L'\0' } };