ShellPkg: Do not write the UNICODE BOM on ConOut.
authorJim_Dailey@Dell.com <Jim_Dailey@Dell.com>
Thu, 18 Feb 2016 14:47:07 +0000 (22:47 +0800)
committerLiming Gao <liming.gao@intel.com>
Thu, 3 Mar 2016 04:45:18 +0000 (12:45 +0800)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jim Dailey <jim_dailey@dell.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
ShellPkg/Application/Shell/FileHandleWrappers.c

index 893e5ffc0466cc59f7b0dc38855848778ae14f3a..a9117bee92ae61e12d0b22d844eb287f71d10e52 100644 (file)
@@ -160,9 +160,11 @@ FileInterfaceStdOutWrite(
 {\r
   if (ShellInfoObject.ShellInitSettings.BitUnion.Bits.NoConsoleOut) {\r
     return (EFI_UNSUPPORTED);\r
-  } else {\r
-    return (gST->ConOut->OutputString(gST->ConOut, Buffer));\r
   }\r
+  if (*((CHAR16 *)Buffer) == gUnicodeFileTag) {\r
+    return (gST->ConOut->OutputString(gST->ConOut, (CHAR16 *)Buffer + 1));\r
+  }\r
+  return (gST->ConOut->OutputString(gST->ConOut, Buffer));\r
 }\r
 \r
 /**\r