You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 1-Draft/RFC0020-DefaultFileEncoding.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,11 +40,11 @@ If the BOM could be written when the platform expects it, interaction with nativ
40
40
41
41
## Specification
42
42
43
-
A new global variable `$PSDefaultFileEncoding` shall be available which allows the user to define the encoding for their system.
44
-
The allowed values for this variable shall be defined by the `Microsoft.PowerShell.Commands.FileSystemCmdletProviderEncoding` enum, with the following additions:
43
+
A new global variable `$PSDefaultEncoding` shall be available which allows the user to define the encoding for their system.
44
+
The allowed values for this variable shall be defined by the `Microsoft.PowerShell.Encoding` enum, with the following additions:
45
45
46
46
* UTF8NoBOM
47
-
*Legacy
47
+
*WindowsLegacy
48
48
49
49
The following is the complete list of `FileSystemCmdletProviderEncoding` members:
50
50
* Ascii
@@ -62,9 +62,9 @@ The following is the complete list of `FileSystemCmdletProviderEncoding` members
62
62
* UTF8
63
63
* UTF8NoBOM
64
64
65
-
When `$PSDefaultFileEncoding` is set to `UTF8NoBOM`, the file shall be created with UTF8 encoding and no BOM shall be written.
65
+
When `$PSDefaultEncoding` is set to `UTF8NoBOM`, the file shall be created with UTF8 encoding and no BOM shall be written.
66
66
67
-
When `$PSDefaultFileEncoding` is set to `Legacy`, the behavior shall be:
67
+
When `$PSDefaultEncoding` is set to `Legacy`, the behavior shall be:
68
68
69
69
```
70
70
CmdletName Encoding
@@ -80,8 +80,8 @@ Redirection UTF16
80
80
```
81
81
This persists the irregular file encoding on non-Windows platforms, and allows Linux files to be used on Windows with the same encoding as exists in previous releases of PowerShell.
82
82
83
-
The default on all platforms shall be `UTF8NOBOM` (including when `$PSDefaultFileEncoding` is not set).
84
-
Naturally, specific use of the `-Encoding` parameter when invoking the cmdlet shall override `$PSDefaultFileEncoding`.
83
+
The default on all platforms shall be `UTF8NOBOM` (including when `$PSDefaultEncoding` is not set).
84
+
Naturally, specific use of the `-Encoding` parameter when invoking the cmdlet shall override `$PSDefaultEncoding`.
85
85
86
86
### Exclusions
87
87
@@ -91,7 +91,7 @@ Remoting protocol cmdlets shall also be unaffected with this change.
91
91
92
92
### Optional
93
93
94
-
We should take this opportunity to rationalize our use of the `Encoding` parameter, and change the cmdlets which use Encoding as `string` or `System.Text.Encoding` type to use `Microsoft.PowerShell.Commands.FileSystemCmdletProviderEncoding`.
94
+
We should take this opportunity to rationalize our use of the `Encoding` parameter, and change the cmdlets which use Encoding as `string` or `System.Text.Encoding` type to use `Microsoft.PowerShell.Encoding`.
95
95
The following cmdlets use various types for the parameter `Encoding`
0 commit comments