0

I am using dot net framework 4.7.1 and VS 2017. Uri.Escapestring does not work for open and close parenthesis

string str = Uri.EscapeDataString(" John ");
Result : %20John%20 - Correct

string str = Uri.EscapeDataString("(John)");
Result : (John) - incorrect - it should be - %28John%29

The same work in my colleague machine with same set of configurations

Any help ?

Bokambo
  • 4,204
  • 27
  • 79
  • 130
  • The code works fine on my machine. .NET Framework 4.6.1, VS 2017. – mjwills Dec 05 '18 at 22:13
  • :) The same work in my colleague machine with same set of configurations , but not for me :( – Bokambo Dec 05 '18 at 22:13
  • 1
    Possible duplicate of [Why does Uri.EscapeDataString return a different result on my CI server compared to my development machine?](https://stackoverflow.com/questions/26309731/why-does-uri-escapedatastring-return-a-different-result-on-my-ci-server-compared) - also https://stackoverflow.com/questions/41006873/uri-escapedatastring-behaves-different-in-nunit-test-vs-asp-net-webservice . – mjwills Dec 05 '18 at 22:14

0 Answers0