Thank you for taking the time to help. I totally missed the format section in the MDE document.
Stephen Carsey, Jaben wrote: > You want to check the PrintLib.h file to find out which flags to use. %a > will print ascii and if I remember correctly this is noted as a difference > from standard usage. > > -Jaben > > -----Original Message----- > From: Stephen Polkowski [mailto:step...@centtech.com] > Sent: Monday, March 25, 2013 4:02 PM > To: edk2-devel@lists.sourceforge.net > Subject: [edk2] AsciiPrint() and %s > > Hello, > > I'm trying to print a simple ASCII string to the console. I decided to > try > AsciiPrint() from the MDE package. I started having problems right away. > The function wouldn't print an Ascii string. Here's my code: > > #include <Uefi.h> > #include <Library/UefiLib.h> > #include <Library/ShellCEntryLib.h> > > INTN EFIAPI ShellAppMain (IN UINTN Argc, IN CHAR16 **Argv) { > > char world[] = "world"; > AsciiPrint("hello %s\n", world); > return 0; > > } > > After some digging around, I noticed that AsciiPrint calls the > BasePrintLibSPrintMarker function which defaults to Unicode for %s. Is this > correct? The documentation for AsciiPrint in the MDE document states that it > will print a formatted ASCII string to the console. However, it makes no > mention of the type of strings supported in the VA list. In my mind it > should be supporting ASCII. Is this a bug or the intended behavior? > > Thanks, > > Stephen > > > BasePrintLib/PrintLibInternal.c: > > case 's': > case 'S': > Flags |= ARGUMENT_UNICODE; > // > // break skipped on purpose > // > case 'a': > > > > > ------------------------------------------------------------------------------ > Own the Future-Intel® Level Up Game Demo Contest 2013 Rise to greatness > in Intel's independent game demo contest. > Compete for recognition, cash, and the chance to get your game on Steam. $5K > grand prize plus 10 genre and skill prizes. > Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/edk2-devel > > ------------------------------------------------------------------------------ > Own the Future-Intel® Level Up Game Demo Contest 2013 > Rise to greatness in Intel's independent game demo contest. > Compete for recognition, cash, and the chance to get your game > on Steam. $5K grand prize plus 10 genre and skill prizes. > Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/edk2-devel -- Stephen Polkowski Centaur Technology Austin, TX (512) 418-5730 ------------------------------------------------------------------------------ Own the Future-Intel® Level Up Game Demo Contest 2013 Rise to greatness in Intel's independent game demo contest. Compete for recognition, cash, and the chance to get your game on Steam. $5K grand prize plus 10 genre and skill prizes. Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel