Re: How to read UTF8 files?
Andrew Fish
On Jul 7, 2021, at 3:01 AM, Konstantin Aladyshev <aladyshev22@...> wrote:Konstantin, You need to deserialize the UTF-8 to Unicode and then serialize that to UCS-2 (CHAR16). The Terminal driver has support for UTF-8 terminals so you can probably leverage some of that code [1]. The Terminal code is probably a little more complex than you need since it has to deal with the data coming in a byte at a time over serial, but the conversion logic is what you are looking for. [1] https://github.com/tianocore/edk2/blob/master/MdeModulePkg/Universal/Console/TerminalDxe/Vtutf8.c#L19 Thanks, Andrew Fish I'm looking for ways to read strings from such files, print these
|
|