From d7597243d6ddf50813af282d6fd1c65559f3ec53 Mon Sep 17 00:00:00 2001 From: Bill Hurt Date: Wed, 17 Apr 2019 14:51:11 -0700 Subject: [PATCH] Small Fixes to Get-FileEncoding This change allows the Get-FileEncoding cmdlet to run on PowerShell core and thus on Linux. The encoding parameter to get content has changed in core so that 'byte' is no longer valid. Unfortunately I had to resort to a stream reader since Get-Content likes to strip a BOM if it exists. The -raw switch only ignores line endings. The alias for Sort-Object to simply 'Sort' has also been removed in the latest versions of PS Core. This change also removes the 'Select' alias, even though it isn't technically removed yet, because there is some discussion around removing all of these aliases in the default PS Core environments, so best to get rid of it now. https://github.com/PowerShell/PowerShell/issues/5870 --- PowerShellCookbook.psm1 | Bin 515426 -> 515438 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/PowerShellCookbook.psm1 b/PowerShellCookbook.psm1 index 2873f96f77b4af5c5a80d60babc1d183123bfe97..b655e68fa8c9ce6c9f669000a5ffa337bbaff728 100644 GIT binary patch delta 178 zcmaE~Oa9$1`Gzfw8sDe?xx*wd-HMG_VtUt4MxN;lF0x5Y&-l*B=NZjV%uor$B@C$y zxeR&?nGE?rG7U)Q07YUMtbi~G$Vy~LVQ>VBvn@5 HY(`H3nN2lZ delta 130 zcmaF2Oa9R=`Gzfw8sDe8urW(b5BSb#GQHy#lLVvgbi*Hv!m>#Wl?){esSFAXx(r1? zI*}oTA(f7Dle= d0iPJz+MRwd0x=U1GXpUT5VLM~`oX626ac7%D-Qqw