From: Jim_Dailey@Dell.com Date: Thu, 18 Feb 2016 14:47:07 +0000 (+0800) Subject: ShellPkg: Do not write the UNICODE BOM on ConOut. X-Git-Tag: edk2-stable201903~7734 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=d73fc181e722d787581eef7b6dc41b2550236fd8 ShellPkg: Do not write the UNICODE BOM on ConOut. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jim Dailey Reviewed-by: Jaben Carsey --- diff --git a/ShellPkg/Application/Shell/FileHandleWrappers.c b/ShellPkg/Application/Shell/FileHandleWrappers.c index 893e5ffc04..a9117bee92 100644 --- a/ShellPkg/Application/Shell/FileHandleWrappers.c +++ b/ShellPkg/Application/Shell/FileHandleWrappers.c @@ -160,9 +160,11 @@ FileInterfaceStdOutWrite( { if (ShellInfoObject.ShellInitSettings.BitUnion.Bits.NoConsoleOut) { return (EFI_UNSUPPORTED); - } else { - return (gST->ConOut->OutputString(gST->ConOut, Buffer)); } + if (*((CHAR16 *)Buffer) == gUnicodeFileTag) { + return (gST->ConOut->OutputString(gST->ConOut, (CHAR16 *)Buffer + 1)); + } + return (gST->ConOut->OutputString(gST->ConOut, Buffer)); } /**