diff options
author | Matt Fleming <matt.fleming@intel.com> | 2013-01-09 15:40:27 +0000 |
---|---|---|
committer | Matt Fleming <matt.fleming@intel.com> | 2013-01-09 15:44:20 +0000 |
commit | a90d4b73e7b487b6a907edecea36af735b6ef512 (patch) | |
tree | 38cb634f265b1a06df520d38d8b92add290eeb39 | |
parent | 627ec7915b7c770b55c37777c42b1a82eea733b8 (diff) | |
download | syslinux-a90d4b73e7b487b6a907edecea36af735b6ef512.tar.gz syslinux-a90d4b73e7b487b6a907edecea36af735b6ef512.tar.xz syslinux-a90d4b73e7b487b6a907edecea36af735b6ef512.zip |
efi: Lookup the Unicode encoding when writing characters
We should be using the system's codepage to lookup the correct Unicode
character when writing characters to the output. This allows us to
seemlessly print the correct Unicode character given an extended ASCII
character, e.g. when drawing boxes in the menu code.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
-rw-r--r-- | efi/main.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1,3 +1,4 @@ +#include <codepage.h> #include <core.h> #include <fs.h> #include <com32.h> @@ -105,8 +106,10 @@ void efi_write_char(uint8_t ch, uint8_t attribute) uefi_call_wrapper(out->SetAttribute, 2, out, attribute); - c[0] = ch; + /* Lookup primary Unicode encoding in the system codepage */ + c[0] = codepage.uni[0][ch]; c[1] = '\0'; + uefi_call_wrapper(out->OutputString, 2, out, c); } |