Skip to content

Uri paths with non-Ascii chars on Unix changed in 5.0 #19965

@MihaZupan

Description

@MihaZupan

Uri paths with non-Ascii chars on Unix changed in 5.0

Absolute Unix file paths that contained non-Ascii characters were parsed incorrectly on Unix systems, resulting in duplications in the output. Fixed in dotnet/runtime#36429

Version introduced

Net 5.0

Old behavior

new Uri("/üri")

AbsoluteUri: "/%C3%BCri/%C3%BCri" // Note the additional "/%C3%BCri" at the end
ToString: "/üri/üri" // Note the additinal "/üri" at the end

New behavior

new Uri("/üri")

AbsoluteUri: "/%C3%BCri"
ToString: "/üri"

Reason for change

  • Previous behavior was a bug and made no sense

Recommended action

  • Document the change

Category

  • Core .NET libraries

Affected APIs

All properties on Uris containing absolute Unix paths with non-Ascii characters on Unix systems.


Issue metadata

  • Issue type: breaking-change

Metadata

Metadata

Assignees

Labels

🏁 Release: .NET 5Work items for the .NET 5 releasebreaking-changeIndicates a .NET Core breaking change

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions