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/Decoder.xml
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -172,7 +172,7 @@ Any remaining processed data that is part of a logical unit, such as the high su
172
172
173
173
The `Convert` method is designed to be used in a loop to decode an arbitrary amount of input, such as data read from a file or stream.
174
174
It stores the output of the decoding operation in a fixed-size buffer.
175
-
<xref:System.Text.Decoder.GetChars%2A> will throw an exception if the output buffer isn't large enough, but <xref:System.Text.Decoder.Convert%2A> will fill as much space as possible and return the bytes read and chars written.
175
+
<xref:System.Text.Decoder.GetChars%2A> will throw an exception if the output buffer isn't large enough, but <xref:System.Text.Decoder.Convert%2A> will fill as much space as possible and return the bytes read and chars written, provided the output array allows for at least two characters.
176
176
Also see <xref:System.Text.Encoding.GetChars%2A?displayProperty=nameWithType> for more comments.
177
177
178
178
]]></format>
@@ -315,7 +315,7 @@ The `completed` parameter can also be set to `false`, even though the `bytesUsed
315
315
<paramrefname="chars" /> or <paramrefname="bytes" /> is <seelangword="null" /> (<seelangword="Nothing" />).</exception>
<paramrefname="charCount" /> or <paramrefname="byteCount" /> is less than zero.</exception>
318
-
<exceptioncref="T:System.ArgumentException">The output buffer is too small to contain any of the converted input. The output buffer should be greater than or equal to the size indicated by the <seecref="Overload:System.Text.Decoder.GetCharCount" /> method.</exception>
318
+
<exceptioncref="T:System.ArgumentException">The output buffer is too small to contain any of the converted input. The output buffer should be at least 2 chars in size to accomodate at least one surrogate character pair.</exception>
319
319
<exceptioncref="T:System.Text.DecoderFallbackException">A fallback occurred (for more information, see <seehref="~/docs/standard/base-types/character-encoding.md">Character Encoding in .NET</see>)
320
320
321
321
-and-
@@ -417,7 +417,7 @@ The following example uses the <xref:System.Text.Encoder.Convert%2A> method to c
417
417
-or-
418
418
419
419
The length of <paramrefname="bytes" /> - <paramrefname="byteIndex" /> is less than <paramrefname="byteCount" />.</exception>
420
-
<exceptioncref="T:System.ArgumentException">The output buffer is too small to contain any of the converted input. The output buffer should be greater than or equal to the size indicated by the <seecref="Overload:System.Text.Decoder.GetCharCount" /> method.</exception>
420
+
<exceptioncref="T:System.ArgumentException">The output buffer is too small to contain any of the converted input. The output buffer should be at least 2 chars in size to accomodate at least one surrogate character pair.</exception>
421
421
<exceptioncref="T:System.Text.DecoderFallbackException">A fallback occurred (for more information, see <seehref="~/docs/standard/base-types/character-encoding.md">Character Encoding in .NET</see>)
422
422
423
423
-and-
@@ -898,7 +898,7 @@ The following example uses the <xref:System.Text.Encoder.Convert%2A> method to c
898
898
899
899
If `GetChars` is called with `flush` set to `false`, the decoder stores trailing bytes at the end of the data block in an internal buffer and uses them in the next decoding operation. The application should call `GetCharCount` on a block of data immediately before calling `GetChars` on the same block, so that any trailing bytes from the previous block are included in the calculation.
900
900
901
-
If your application is to convert many segments of an input stream, consider using the <xref:System.Text.Decoder.Convert%2A> method. <xref:System.Text.Decoder.GetChars%2A> will throw an exception if the output span isn't large enough, but <xref:System.Text.Decoder.Convert%2A> will fill as much space as possible and return the bytes read and chars written. Also see the <xref:System.Text.Encoding.GetChars%2A?displayProperty=nameWithType> topic for more comments.
901
+
If your application is to convert many segments of an input stream, consider using the <xref:System.Text.Decoder.Convert%2A> method. <xref:System.Text.Decoder.GetChars%2A> will throw an exception if the output span isn't large enough, but <xref:System.Text.Decoder.Convert%2A> will fill as much space as possible and return the bytes read and chars written, provided the output array allows for at least two characters. Also see the <xref:System.Text.Encoding.GetChars%2A?displayProperty=nameWithType> topic for more comments.
902
902
903
903
]]></format>
904
904
</remarks>
@@ -972,7 +972,7 @@ The following example uses the <xref:System.Text.Encoder.Convert%2A> method to c
972
972
973
973
If `GetChars` is called with `flush` set to `false`, the decoder stores trailing bytes at the end of the data block in an internal buffer and uses them in the next decoding operation. The application should call `GetCharCount` on a block of data immediately before calling `GetChars` on the same block, so that any trailing bytes from the previous block are included in the calculation.
974
974
975
-
If your application is to convert many segments of an input stream, consider using the <xref:System.Text.Decoder.Convert%2A> method. <xref:System.Text.Decoder.GetChars%2A> will throw an exception if the output buffer isn't large enough, but <xref:System.Text.Decoder.Convert%2A> will fill as much space as possible and return the bytes read and chars written. Also see the <xref:System.Text.Encoding.GetChars%2A?displayProperty=nameWithType> topic for more comments.
975
+
If your application is to convert many segments of an input stream, consider using the <xref:System.Text.Decoder.Convert%2A> method. <xref:System.Text.Decoder.GetChars%2A> will throw an exception if the output buffer isn't large enough, but <xref:System.Text.Decoder.Convert%2A> will fill as much space as possible and return the bytes read and chars written, provided the output array allows for at least two characters. Also see the <xref:System.Text.Encoding.GetChars%2A?displayProperty=nameWithType> topic for more comments.
976
976
977
977
]]></format>
978
978
</remarks>
@@ -1055,7 +1055,7 @@ The following example uses the <xref:System.Text.Encoder.Convert%2A> method to c
1055
1055
1056
1056
If `GetChars` is called with `flush` set to `false`, the decoder stores trailing bytes at the end of the data block in an internal buffer and uses them in the next decoding operation. The application should call `GetCharCount` on a block of data immediately before calling `GetChars` on the same block, so that any trailing bytes from the previous block are included in the calculation.
1057
1057
1058
-
If your application is to convert many segments of an input stream, consider using the <xref:System.Text.Decoder.Convert%2A> method. <xref:System.Text.Decoder.GetChars%2A> will throw an exception if the output buffer isn't large enough, but <xref:System.Text.Decoder.Convert%2A> will fill as much space as possible and return the bytes read and chars written. Also see the <xref:System.Text.Encoding.GetChars%2A?displayProperty=nameWithType> topic for more comments.
1058
+
If your application is to convert many segments of an input stream, consider using the <xref:System.Text.Decoder.Convert%2A> method. <xref:System.Text.Decoder.GetChars%2A> will throw an exception if the output buffer isn't large enough, but <xref:System.Text.Decoder.Convert%2A> will fill as much space as possible and return the bytes read and chars written, provided the output array allows for at least two characters. Also see the <xref:System.Text.Encoding.GetChars%2A?displayProperty=nameWithType> topic for more comments.
1059
1059
1060
1060
1061
1061
@@ -1157,7 +1157,7 @@ The following example uses the <xref:System.Text.Encoder.Convert%2A> method to c
1157
1157
1158
1158
If `GetChars` is called with `flush` set to `false`, the decoder stores trailing bytes at the end of the data block in an internal buffer and uses them in the next decoding operation. The application should call `GetCharCount` on a block of data immediately before calling `GetChars` on the same block, so that any trailing bytes from the previous block are included in the calculation.
1159
1159
1160
-
If your application is to convert many segments of an input stream, consider using the <xref:System.Text.Decoder.Convert%2A> method. <xref:System.Text.Decoder.GetChars%2A> will throw an exception if the output buffer isn't large enough, but <xref:System.Text.Decoder.Convert%2A> will fill as much space as possible and return the bytes read and chars written. Also see the <xref:System.Text.Encoding.GetChars%2A?displayProperty=nameWithType> topic for more comments.
1160
+
If your application is to convert many segments of an input stream, consider using the <xref:System.Text.Decoder.Convert%2A> method. <xref:System.Text.Decoder.GetChars%2A> will throw an exception if the output buffer isn't large enough, but <xref:System.Text.Decoder.Convert%2A> will fill as much space as possible and return the bytes read and chars written, provided the output array allows for at least two characters. Also see the <xref:System.Text.Encoding.GetChars%2A?displayProperty=nameWithType> topic for more comments.
0 commit comments