From 45fd6aeca0a91f14fe942035ddb3f7e7873483fa Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Jun 2025 06:57:01 +0000 Subject: [PATCH 1/2] Initial plan for issue From 124961f40d07efdc71dcc34d62ca2ea5d3a478fb Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Jun 2025 07:01:26 +0000 Subject: [PATCH 2/2] Document Unicode encoding behavior in Uri.GetLeftPart method Co-authored-by: jeffhandley <1031940+jeffhandley@users.noreply.github.com> --- xml/System/Uri.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xml/System/Uri.xml b/xml/System/Uri.xml index c0cec77e4be..7b9fda102ac 100644 --- a/xml/System/Uri.xml +++ b/xml/System/Uri.xml @@ -2442,6 +2442,12 @@ If you used an escaped string to construct this instance (for example, `"http:// The method returns a string containing the leftmost portion of the URI string, ending with the portion specified by `part`. +> [!IMPORTANT] +> The method performs Unicode character encoding and normalization as part of its processing. It is not a simple string manipulation method. The returned string may differ from the original URI string due to this encoding behavior. + +The method is equivalent to calling with the appropriate flags. For example: +- `GetLeftPart(UriPartial.Authority)` is equivalent to `GetComponents(UriComponents.Scheme | UriComponents.UserInfo | UriComponents.Host | UriComponents.Port, UriFormat.UriEscaped)` + includes delimiters in the following cases: - includes the scheme delimiter.