How to encode URLs containing Unicode? I would like to pass it to a command line utility and I need to encode it first.
Example: http://zh.wikipedia.org/wiki/白
http://zh.wikipedia.org/wiki/白
According to MSDN you can't use UrlPathEncode anymore.
So, Correct way of doing it now is,
var urlString = Uri.EscapeUriString("http://zh.wikipedia.org/wiki/白雜訊");