mirror of
				https://git.proxmox.com/git/mirror_edk2
				synced 2025-11-04 02:19:12 +00:00 
			
		
		
		
	ShellPkg: Don't strip BOM when piping UCS2 data to a UEFI app
If the BOM is stripped from StdIn, then an app that duplicates StdIn will not be able to duplicate, say, a UCS2 file that was piped into it (the output file it creates would not start with a BOM). Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jim Dailey <jim_dailey@dell.com> Reviewed-by: Jaben Carsey <Jaben.Carsey@intel.com>
This commit is contained in:
		
							parent
							
								
									d777442bb4
								
							
						
					
					
						commit
						0b966ddd61
					
				@ -1265,18 +1265,13 @@ UpdateStdInStdOutStdErr(
 | 
			
		||||
          &TempHandle,
 | 
			
		||||
          EFI_FILE_MODE_READ,
 | 
			
		||||
          0);
 | 
			
		||||
        if (InUnicode) {
 | 
			
		||||
          //
 | 
			
		||||
          // Chop off the 0xFEFF if it's there...
 | 
			
		||||
          //
 | 
			
		||||
          RemoveFileTag(&TempHandle);
 | 
			
		||||
        } else if (!EFI_ERROR(Status)) {
 | 
			
		||||
          //
 | 
			
		||||
          // Create the ASCII->Unicode conversion layer
 | 
			
		||||
          //
 | 
			
		||||
          TempHandle = CreateFileInterfaceFile(TempHandle, FALSE);
 | 
			
		||||
        }
 | 
			
		||||
        if (!EFI_ERROR(Status)) {
 | 
			
		||||
          if (!InUnicode) {
 | 
			
		||||
            //
 | 
			
		||||
            // Create the ASCII->Unicode conversion layer
 | 
			
		||||
            //
 | 
			
		||||
            TempHandle = CreateFileInterfaceFile(TempHandle, FALSE);
 | 
			
		||||
          }
 | 
			
		||||
          ShellParameters->StdIn = TempHandle;
 | 
			
		||||
          gST->ConIn = CreateSimpleTextInOnFile(TempHandle, &gST->ConsoleInHandle);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user