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: xml/System.Text/Encoding.xml
+8-6Lines changed: 8 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -271,7 +271,7 @@ The following table lists the encodings supported by .NET. It lists each encodin
271
271
- 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.
272
272
273
273
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.
274
-
274
+
275
275
## Examples
276
276
The following example converts a string from one encoding to another.
277
277
@@ -588,7 +588,7 @@ The following example demonstrates the effect of the ASCII encoding on character
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.
591
-
591
+
592
592
## Examples
593
593
The following example reads a text file with a UTF-16 encoding using the big endian byte order.
594
594
@@ -2497,7 +2497,7 @@ On .NET Core, the <xref:System.Text.Encoding.Default%2A> property always returns
@@ -3728,7 +3728,7 @@ In .NET 5.0 and later versions, the code page name `utf-7` is not supported.
3728
3728
## Remarks
3729
3729
3730
3730
> [!NOTE]
3731
-
> - 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.
3731
+
> - 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.
3732
3732
> - In .NET 5.0 and later versions, the code page identifier `65000`, which represents UTF-7, is not supported.
3733
3733
3734
3734
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.
@@ -3902,7 +3902,9 @@ In .NET 5.0 and later versions, the code page name `utf-7` is not supported.
3902
3902
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>.
3903
3903
3904
3904
> [!NOTE]
3905
-
> 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.
3905
+
> 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>.
3906
+
>
3907
+
> In .NET Framework and .NET Core, the returned list of supported encodings *does not* include these additional encodings.
3906
3908
3907
3909
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)".
Copy file name to clipboardExpand all lines: xml/System.Text/EncodingExtensions.xml
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@
14
14
</Base>
15
15
<Interfaces />
16
16
<Docs>
17
-
<summary>To be added.</summary>
17
+
<summary>Provides extension methods for the encoding types, such as <seecref="T:System.Text.Encoding" />, <seecref="T:System.Text.Encoder" />, and <seecref="T:System.Text.Decoder" />.</summary>
18
18
<remarks>To be added.</remarks>
19
19
</Docs>
20
20
<Members>
@@ -322,7 +322,7 @@
322
322
<paramname="chars">The sequence to encode to bytes.</param>
323
323
<paramname="writer">The buffer to which the encoded bytes will be written.</param>
324
324
<summary>Encodes the specified <seecref="T:System.ReadOnlySpan`1" /> to <seelangword="byte" />s using the specified <seecref="T:System.Text.Encoding" /> and writes the result to <paramrefname="writer" />.</summary>
325
-
<returns>To be added.</returns>
325
+
<returns>The number of bytes written to <paramrefname="writer" />.</returns>
<paramrefname="chars" /> contains data that cannot be encoded and <paramrefname="encoding" /> is configured to throw when such data is seen.</exception>
0 commit comments