Résolu Interface graphique avec PS v7

Plus d'informations
il y a 1 an 9 mois #32415 par Laurent Dardenne
La gestion de l'encodage a changée entre la 6.0 et la 7.0.
Voir aussi :
C:\Users\Laurent\Downloads\whatsnew\Microsoft.PowerShell.WhatsNew> Get-WhatsNew -version 6.0,6.1,6.2,7.0 | Select-String -pattern 'encoding'

- Set the output encoding to [Console]::OutputEncoding for native commands (#10824)
## Default encoding is UTF-8 without a BOM except for New-ModuleManifest
In the past, Windows PowerShell cmdlets like `Get-Content`, `Set-Content` used different encodings,
such as ASCII and UTF-16. The variance in encoding defaults created problems when mixing cmdlets
without specifying an encoding.
encoding for text files. More Windows applications and tools are moving away from UTF-16 and towards
BOM-less UTF-8 encoding. PowerShell Core changes the default encoding to conform with the broader
This means that all built-in cmdlets that use the `-Encoding` parameter use the `UTF8NoBOM` value by
These cmdlets have also been updated so that the `-Encoding` parameter universally accepts
`System.Text.Encoding`.
The default value of `$OutputEncoding` has also been changed to UTF-8.
As a best practice, you should explicitly set encodings in scripts using the `-Encoding` parameter
`New-ModuleManifest` cmdlet does not have **Encoding** parameter. The encoding of the module
PowerShell Core running on Linux then encoding is UTF-8 (no BOM); otherwise encoding is UTF-16 (with
- [PR #6109](github.com/PowerShell/PowerShell/pull/6109) - default encoding set to UTF-8 for
- Add unified attribute for completion for **Encoding** parameter. (#7732) (Thanks @ThreeFive-O!)
- Allow numeric Ids and name of registered code pages in **Encoding** parameters (#7636) (Thanks

Tutoriels PowerShell

Connexion ou Créer un compte pour participer à la conversation.

Temps de génération de la page : 0.086 secondes
Propulsé par Kunena