Use the Uri.UnescapeDataString
method which you can call from powershell like this:
# > [Uri]::UnescapeDataString("O%27Brien")
O'Brien
質問
I have a csv file that contains names Like O'Brien that appear as O%27Brien or St. Something that appear as St%2ESomething. I don't have access to generate a new csv of this data, and I need the names in a correct format because I'm writing a PowerShell script to search for the names on another server.
I tried implementing something similar to the answer to this but I can't get it to work for the problem I'm experiencing.
It doesn't matter to me if the solution is in PowerShell as long as I can run it on Windows 7.
解決
Use the Uri.UnescapeDataString
method which you can call from powershell like this:
# > [Uri]::UnescapeDataString("O%27Brien")
O'Brien