On 31.03.19 04:18, Simon Glass wrote: > Hi Andre, > > On Fri, 22 Mar 2019 at 19:32, Andre Przywara <andre.przyw...@arm.com> wrote: >> The character set used by U-Boot's built-in fonts is the old "code >> page 437" (from the original IBM PC). >> However people would probably expect UTF-8 on a terminal these days, the >> UEFI code definitely does. >> >> Provide a conversion routine to convert a UTF-8 byte stream into a CP437 >> character code. This uses a combination of arrays and switch/case >> statements to provide an efficient way of translating the large Unicode >> character range to the 8 bits used for CP437. >> >> This fixes UEFI display on the DM_VIDEO console, which were garbled for >> any non-ASCII characters, for instance for the block graphic characters >> used by Grub to display the menu. >> >> Signed-off-by: Andre Przywara <andre.przyw...@arm.com> >> --- >> drivers/video/Makefile | 1 + >> drivers/video/utf8_cp437.c | 170 >> ++++++++++++++++++++++++++++++++++++++ >> drivers/video/vidconsole-uclass.c | 8 +- >> include/video_console.h | 9 ++ >> 4 files changed, 186 insertions(+), 2 deletions(-) >> create mode 100644 drivers/video/utf8_cp437.c > OMG unicode comes to U-Boot. This might be the beginning of the end. > > Can we make this a Kconfig option to avoid increasing code size? We > can imply it when EFI is enabled.
This looks vaguely familiar. Take a look at include/cp437.h. We even have a Kconfig option for it already :). Alex > > Regards, > Simon _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot