Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #2937 - add Encoding param codepage support #4178

Merged
merged 2 commits into from
Apr 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions reference/6/Microsoft.PowerShell.Management/Add-Content.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,11 @@ The acceptable values for this parameter are as follows:
- **UTF32**: Encodes in UTF-32 format.
- **Unknown**: The encoding type is unknown or invalid; the data can be treated as binary.

Beginning with PowerShell 6.2, the **Encoding** parameter also allows numeric IDs of registered code
pages (like `-Encoding 1251`) or string names of registered code pages (like
`-Encoding "windows-1251"`). For more information, see the .NET documentation for
[Encoding.CodePage](/dotnet/api/system.text.encoding.codepage?view=netcore-2.2).

```yaml
Type: Encoding
Parameter Sets: (All)
Expand Down
5 changes: 5 additions & 0 deletions reference/6/Microsoft.PowerShell.Management/Get-Content.md
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,11 @@ operation. The default **ReadCount** value, 1, reads one byte in each read opera
each byte into a separate object, which causes errors when you use the `Set-Content` cmdlet to write
the bytes to a file unless you use **AsByteStream** parameter.

Beginning with PowerShell 6.2, the **Encoding** parameter also allows numeric IDs of registered code
pages (like `-Encoding 1251`) or string names of registered code pages (like
`-Encoding "windows-1251"`). For more information, see the .NET documentation for
[Encoding.CodePage](/dotnet/api/system.text.encoding.codepage?view=netcore-2.2).

```yaml
Type: Encoding
Parameter Sets: (All)
Expand Down
5 changes: 5 additions & 0 deletions reference/6/Microsoft.PowerShell.Management/Set-Content.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,11 @@ The acceptable values for this parameter are as follows:
- **UTF32**: Encodes in UTF-32 format.
- **Unknown**: The encoding type is unknown or invalid; the data can be treated as binary.

Beginning with PowerShell 6.2, the **Encoding** parameter also allows numeric IDs of registered code
pages (like `-Encoding 1251`) or string names of registered code pages (like
`-Encoding "windows-1251"`). For more information, see the .NET documentation for
[Encoding.CodePage](/dotnet/api/system.text.encoding.codepage?view=netcore-2.2).

```yaml
Type: Encoding
Parameter Sets: (All)
Expand Down
5 changes: 5 additions & 0 deletions reference/6/Microsoft.PowerShell.Utility/Export-Clixml.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,11 @@ The acceptable values for this parameter are as follows:
- **UTF32**: Encodes in UTF-32 format.
- **Unknown**: The encoding type is unknown or invalid; the data can be treated as binary.

Beginning with PowerShell 6.2, the **Encoding** parameter also allows numeric IDs of registered code
pages (like `-Encoding 1251`) or string names of registered code pages (like
`-Encoding "windows-1251"`). For more information, see the .NET documentation for
[Encoding.CodePage](/dotnet/api/system.text.encoding.codepage?view=netcore-2.2).

```yaml
Type: Encoding
Parameter Sets: (All)
Expand Down
13 changes: 9 additions & 4 deletions reference/6/Microsoft.PowerShell.Utility/Export-Csv.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ file.

### Delimiter (Default)

```
```
Export-Csv [[-Path] <string>] [[-Delimiter] <char>] -InputObject <psobject> [-LiteralPath <string>]
[-Force] [-NoClobber] [-Encoding <Encoding>] [-Append] [-IncludeTypeInformation]
[-NoTypeInformation] [-WhatIf] [-Confirm] [<CommonParameters>]
```

### UseCulture

```
```
Export-Csv [[-Path] <string>] -InputObject <psobject> [-LiteralPath <string>] [-Force] [-NoClobber]
[-Encoding <Encoding>] [-Append] [-UseCulture] [-IncludeTypeInformation] [-NoTypeInformation]
[-WhatIf] [-Confirm] [<CommonParameters>]
Expand Down Expand Up @@ -310,7 +310,7 @@ $AdditionalContent | Export-Csv -Path .\ParmFile.csv -NoTypeInformation -Append
```

```Output
Export-Csv : Cannot append CSV content to the following file: ParmFile.csv.
Export-Csv : Cannot append CSV content to the following file: ParmFile.csv.
The appended object does not have a property that corresponds to the following column:
Version. To continue with mismatched properties, add the -Force parameter, and then retry
the command.
Expand Down Expand Up @@ -407,6 +407,11 @@ The acceptable values for this parameter are as follows:
- **UTF32**: Encodes in UTF-32 format.
- **Unknown**: The encoding type is unknown or invalid; the data can be treated as binary.

Beginning with PowerShell 6.2, the **Encoding** parameter also allows numeric IDs of registered code
pages (like `-Encoding 1251`) or string names of registered code pages (like
`-Encoding "windows-1251"`). For more information, see the .NET documentation for
[Encoding.CodePage](/dotnet/api/system.text.encoding.codepage?view=netcore-2.2).

```yaml
Type: Encoding
Parameter Sets: (All)
Expand Down Expand Up @@ -628,7 +633,7 @@ the methods of the object.
The CSV strings are output as follows:

- If **IncludeTypeInformation** is used, the first string contains the **#TYPE** information header
followed by the object type's fully qualified name.
followed by the object type's fully qualified name.
For example, **#TYPE System.Diagnostics.Process**.
- If **IncludeTypeInformation** is not used the first string includes the column headers. The
headers contain the first object's property names as a comma-separated list.
Expand Down
5 changes: 5 additions & 0 deletions reference/6/Microsoft.PowerShell.Utility/Export-PSSession.md
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,11 @@ The acceptable values for this parameter are as follows:
- **UTF32**: Encodes in UTF-32 format.
- **Unknown**: The encoding type is unknown or invalid; the data can be treated as binary.

Beginning with PowerShell 6.2, the **Encoding** parameter also allows numeric IDs of registered code
pages (like `-Encoding 1251`) or string names of registered code pages (like
`-Encoding "windows-1251"`). For more information, see the .NET documentation for
[Encoding.CodePage](/dotnet/api/system.text.encoding.codepage?view=netcore-2.2).

```yaml
Type: Encoding
Parameter Sets: (All)
Expand Down
7 changes: 6 additions & 1 deletion reference/6/Microsoft.PowerShell.Utility/Format-Hex.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Format-Hex -Path .\File.t7f

```Output
Path: C:\Test\File.t7f

00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F

00000000 25 50 44 46 2D 31 2E 35 0D 0A 25 B5 B5 B5 B5 0D %PDF-1.5..%????.
Expand Down Expand Up @@ -109,6 +109,11 @@ The acceptable values for this parameter are as follows:
- **UTF32**: Encodes in UTF-32 format.
- **Unknown**: The encoding type is unknown or invalid; the data can be treated as binary.

Beginning with PowerShell 6.2, the **Encoding** parameter also allows numeric IDs of registered code
pages (like `-Encoding 1251`) or string names of registered code pages (like
`-Encoding "windows-1251"`). For more information, see the .NET documentation for
[Encoding.CodePage](/dotnet/api/system.text.encoding.codepage?view=netcore-2.2).

```yaml
Type: Encoding
Parameter Sets: ByInputObject
Expand Down
7 changes: 6 additions & 1 deletion reference/6/Microsoft.PowerShell.Utility/Import-Csv.md
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ Accept wildcard characters: False

### -Encoding

Specifies the encoding for the exported CSV file. The default value is **UTF8NoBOM**.
Specifies the encoding for the imported CSV file. The default value is **UTF8NoBOM**.

The acceptable values for this parameter are as follows:

Expand All @@ -336,6 +336,11 @@ The acceptable values for this parameter are as follows:
- **UTF32**: Encodes in UTF-32 format.
- **Unknown**: The encoding type is unknown or invalid; the data can be treated as binary.

Beginning with PowerShell 6.2, the **Encoding** parameter also allows numeric IDs of registered code
pages (like `-Encoding 1251`) or string names of registered code pages (like
`-Encoding "windows-1251"`). For more information, see the .NET documentation for
[Encoding.CodePage](/dotnet/api/system.text.encoding.codepage?view=netcore-2.2).

```yaml
Type: Encoding
Parameter Sets: (All)
Expand Down
5 changes: 5 additions & 0 deletions reference/6/Microsoft.PowerShell.Utility/Out-File.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,11 @@ The acceptable values for this parameter are as follows:
- **UTF32**: Encodes in UTF-32 format.
- **Unknown**: The encoding type is unknown or invalid; the data can be treated as binary.

Beginning with PowerShell 6.2, the **Encoding** parameter also allows numeric IDs of registered code
pages (like `-Encoding 1251`) or string names of registered code pages (like
`-Encoding "windows-1251"`). For more information, see the .NET documentation for
[Encoding.CodePage](/dotnet/api/system.text.encoding.codepage?view=netcore-2.2).

```yaml
Type: Encoding
Parameter Sets: (All)
Expand Down
5 changes: 5 additions & 0 deletions reference/6/Microsoft.PowerShell.Utility/Select-String.md
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,11 @@ The acceptable values for this parameter are as follows:
- **UTF32**: Encodes in UTF-32 format.
- **Unknown**: The encoding type is unknown or invalid; the data can be treated as binary.

Beginning with PowerShell 6.2, the **Encoding** parameter also allows numeric IDs of registered code
pages (like `-Encoding 1251`) or string names of registered code pages (like
`-Encoding "windows-1251"`). For more information, see the .NET documentation for
[Encoding.CodePage](/dotnet/api/system.text.encoding.codepage?view=netcore-2.2).

```yaml
Type: Encoding
Parameter Sets: (All)
Expand Down
5 changes: 5 additions & 0 deletions reference/6/Microsoft.PowerShell.Utility/Send-MailMessage.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,11 @@ The acceptable values for this parameter are as follows:
- **UTF32**: Encodes in UTF-32 format.
- **Unknown**: The encoding type is unknown or invalid; the data can be treated as binary.

Beginning with PowerShell 6.2, the **Encoding** parameter also allows numeric IDs of registered code
pages (like `-Encoding 1251`) or string names of registered code pages (like
`-Encoding "windows-1251"`). For more information, see the .NET documentation for
[Encoding.CodePage](/dotnet/api/system.text.encoding.codepage?view=netcore-2.2).

```yaml
Type: Encoding
Parameter Sets: (All)
Expand Down