diff --git a/src/mono/wasm/debugger/BrowserDebugProxy/DebugStore.cs b/src/mono/wasm/debugger/BrowserDebugProxy/DebugStore.cs index 6d6fa4c4036caf..bcb1b954171f6c 100644 --- a/src/mono/wasm/debugger/BrowserDebugProxy/DebugStore.cs +++ b/src/mono/wasm/debugger/BrowserDebugProxy/DebugStore.cs @@ -1207,11 +1207,9 @@ private static string EscapeAscii(string path) { switch (c) { - case var _ when c >= 'a' && c <= 'z': - case var _ when c >= 'A' && c <= 'Z': - case var _ when char.IsDigit(c): + case var _ when char.IsLetterOrDigit(c): case var _ when c > 255: - case var _ when c == '+' || c == ':' || c == '.' || c == '-' || c == '_' || c == '~': + case var _ when c == '+' || c == ':' || c == '.' || c == '-' || c == '_' || c == '~' || c == '´' || c == '`' || c == '^' || c == '¨': builder.Append(c); break; case var _ when c == Path.DirectorySeparatorChar: @@ -1220,13 +1218,14 @@ private static string EscapeAscii(string path) builder.Append(c); break; default: - builder.Append(string.Format($"%{((int)c):X2}")); + builder.AppendFormat("%{0:X2}", (int)c); break; } } return builder.ToString(); } + internal void AddMethod(MethodInfo mi) { if (!this.methods.ContainsKey(mi.Token)) diff --git a/src/mono/wasm/debugger/DebuggerTestSuite/MiscTests.cs b/src/mono/wasm/debugger/DebuggerTestSuite/MiscTests.cs index 137932efa99acb..ee626ee4c9f6fa 100644 --- a/src/mono/wasm/debugger/DebuggerTestSuite/MiscTests.cs +++ b/src/mono/wasm/debugger/DebuggerTestSuite/MiscTests.cs @@ -964,7 +964,7 @@ await EvaluateAndCheck( "dotnet://debugger-test-special-char-in-path.dll/test#.cs")] [InlineData( "DebuggerTests.CheckSNonAsciiCharactersInPath", - "dotnet://debugger-test-special-char-in-path.dll/non-ascii-test-ął.cs")] + "dotnet://debugger-test-special-char-in-path.dll/non-ascii-test-ąłÅ.cs")] public async Task SetBreakpointInProjectWithSpecialCharactersInPath( string classWithNamespace, string expectedFileLocation) { diff --git "a/src/mono/wasm/debugger/tests/debugger-test-special-char-in-path-#@/non-ascii-test-\304\205\305\202.cs" "b/src/mono/wasm/debugger/tests/debugger-test-special-char-in-path-#@/non-ascii-test-\304\205\305\202\303\205.cs" similarity index 100% rename from "src/mono/wasm/debugger/tests/debugger-test-special-char-in-path-#@/non-ascii-test-\304\205\305\202.cs" rename to "src/mono/wasm/debugger/tests/debugger-test-special-char-in-path-#@/non-ascii-test-\304\205\305\202\303\205.cs"