Skip to content
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
4 changes: 2 additions & 2 deletions xml/System.Text/CodePagesEncodingProvider.xml
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@ The .NET Framework supports a large number of character encodings and code pages
</ReturnValue>
<Parameters />
<Docs>
<summary>To be added.</summary>
<returns>To be added.</returns>
<summary>Returns an array that contains all the encodings that are supported by the <see cref="T:System.Text.CodePagesEncodingProvider" />.</summary>
<returns>An array that contains all the supported encodings.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
Expand Down
14 changes: 8 additions & 6 deletions xml/System.Text/Encoding.xml
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ The following table lists the encodings supported by .NET. It lists each encodin
- Change to an application-specific behavior through use of the <xref:System.Text.EncoderFallback> and <xref:System.Text.DecoderFallback> classes with the U+FFFD Unicode replacement character.

You should throw an exception on any data stream error. An app either uses a "throwonerror" flag when applicable or uses the <xref:System.Text.EncoderExceptionFallback> and <xref:System.Text.DecoderExceptionFallback> classes. Best fit fallback is often not recommended because it can cause data loss or confusion and is slower than simple character replacements. For ANSI encodings, the best fit behavior is the default.

## Examples
The following example converts a string from one encoding to another.

Expand Down Expand Up @@ -588,7 +588,7 @@ The following example demonstrates the effect of the ASCII encoding on character
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Text.Encoding.BigEndianUnicode/VB/bigendianunicode1.vb" id="Snippet2":::

The returned <xref:System.Text.UnicodeEncoding> object has <xref:System.Text.Encoding.BodyName%2A>, <xref:System.Text.Encoding.HeaderName%2A>, and <xref:System.Text.Encoding.WebName%2A> properties, which yield the name "unicodeFFFE". Although the UTF-16 big endian byte order mark is hexadecimal FEFF, the name "unicodeFFFE" was chosen because the byte order mark appears as hexadecimal FFFE on little endian Windows computers.

## Examples
The following example reads a text file with a UTF-16 encoding using the big endian byte order.

Expand Down Expand Up @@ -2497,7 +2497,7 @@ On .NET Core, the <xref:System.Text.Encoding.Default%2A> property always returns

:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Text.Encoding.GetBytes_String/CPP/getbytes_string.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Text.Encoding.GetBytes_String/CS/getbytes_string.cs" interactive="try-dotnet" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Text.Encoding.GetBytes_String/VB/getbytes_string.vb" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Text.Encoding.GetBytes_String/VB/getbytes_string.vb" id="Snippet1":::

]]></format>
</remarks>
Expand Down Expand Up @@ -2951,7 +2951,7 @@ On .NET Core, the <xref:System.Text.Encoding.Default%2A> property always returns
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Text.Encoding.GetChars/CPP/getchars.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Text.Encoding.GetChars/CS/getchars.cs" interactive="try-dotnet" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Text.Encoding.GetChars/VB/getchars.vb" id="Snippet1":::

]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
Expand Down Expand Up @@ -3728,7 +3728,7 @@ In .NET 5.0 and later versions, the code page name `utf-7` is not supported.
## Remarks

> [!NOTE]
> - Some unsupported code pages cause the exception <xref:System.ArgumentException> to be thrown, whereas others cause <xref:System.NotSupportedException>. Therefore, your code must catch all exceptions indicated in the Exceptions section.
> - Some unsupported code pages cause the exception <xref:System.ArgumentException> to be thrown, whereas others cause <xref:System.NotSupportedException>. Therefore, your code must catch all exceptions indicated in the Exceptions section.
> - In .NET 5.0 and later versions, the code page identifier `65000`, which represents UTF-7, is not supported.

In .NET Framework, the <xref:System.Text.Encoding.GetEncoding%2A> method relies on the underlying platform to support most code pages. However, .NET Framework natively supports some encodings. For a list of code pages, see [List of encodings](/dotnet/api/system.text.encoding#list-of-encodings). In .NET Core, the <xref:System.Text.Encoding.GetEncoding%2A> method returns the encodings natively supported by .NET Core. On both .NET implementations, you can call the <xref:System.Text.Encoding.GetEncodings%2A> method to get an array of <xref:System.Text.EncodingInfo> objects that contains information about all available encodings.
Expand Down Expand Up @@ -3902,7 +3902,9 @@ In .NET 5.0 and later versions, the code page name `utf-7` is not supported.
This method returns a list of supported encodings, uniquely distinguished by code page. For a table that lists the supported encodings, see <xref:System.Text.Encoding>.

> [!NOTE]
> The list of supported encodings returned by the <xref:System.Text.Encoding.GetEncodings%2A> method does not include any additional encodings made available by any <xref:System.Text.EncodingProvider> implementations that were registered by calls to the <xref:System.Text.Encoding.RegisterProvider%2A> method.
> In .NET 5.0 and later versions, the list of supported encodings that <xref:System.Text.Encoding.GetEncodings%2A> returns includes any additional encodings made available by any <xref:System.Text.EncodingProvider> implementations that were registered by calling <xref:System.Text.Encoding.RegisterProvider%2A>.
>
> In .NET Framework and .NET Core, the returned list of supported encodings *does not* include these additional encodings.

On .NET Framework, encodings 50220 and 50222 are both associated with the name "iso-2022-jp", but they are not identical. Encoding 50220 converts half-width Katakana characters to full-width Katakana characters, whereas encoding 50222 uses a shift-in/shift-out sequence to encode half-width Katakana characters. The display name for encoding 50222 is "Japanese (JIS-Allow 1 byte Kana - SO/SI)" to distinguish it from encoding 50220, which has the display name "Japanese (JIS)".

Expand Down
4 changes: 2 additions & 2 deletions xml/System.Text/EncodingExtensions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</Base>
<Interfaces />
<Docs>
<summary>To be added.</summary>
<summary>Provides extension methods for the encoding types, such as <see cref="T:System.Text.Encoding" />, <see cref="T:System.Text.Encoder" />, and <see cref="T:System.Text.Decoder" />.</summary>
<remarks>To be added.</remarks>
</Docs>
<Members>
Expand Down Expand Up @@ -322,7 +322,7 @@
<param name="chars">The sequence to encode to bytes.</param>
<param name="writer">The buffer to which the encoded bytes will be written.</param>
<summary>Encodes the specified <see cref="T:System.ReadOnlySpan`1" /> to <see langword="byte" />s using the specified <see cref="T:System.Text.Encoding" /> and writes the result to <paramref name="writer" />.</summary>
<returns>To be added.</returns>
<returns>The number of bytes written to <paramref name="writer" />.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.Text.EncoderFallbackException">
<paramref name="chars" /> contains data that cannot be encoded and <paramref name="encoding" /> is configured to throw when such data is seen.</exception>
Expand Down
Loading