-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
Labels
area-System.IObreaking-changeIssue or PR that represents a breaking API or functional change over a previous release.Issue or PR that represents a breaking API or functional change over a previous release.documentationDocumentation bug or enhancement, does not impact product or test codeDocumentation bug or enhancement, does not impact product or test code
Milestone
Description
Follow-up to #80331 (comment).
On the following code:
var ms = new MemoryStream(new byte[] { 0x01, 0xC2 });
using (var br = new BinaryReader(ms))
{
string s = br.ReadString();
Console.WriteLine(s);
Console.WriteLine(s.Length);
Console.WriteLine(s == "\uFFFD");
}ReadString returns empty string on .NET 8 or prior. After #80331, it returns "\uFFFD".
Thanks @GrabYourPitchforks for pointing the error after merge and share the affected scenario in question.
cc @teo-tsirpanis @adamsitnik
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-System.IObreaking-changeIssue or PR that represents a breaking API or functional change over a previous release.Issue or PR that represents a breaking API or functional change over a previous release.documentationDocumentation bug or enhancement, does not impact product or test codeDocumentation bug or enhancement, does not impact product or test code