let urlQueryAllowed = "Jack你是一个好人".addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!
print(urlQueryAllowed)//url中文转码
print(urlQueryAllowed.removingPercentEncoding!)//url中文解码
转载于:https://my.oschina.net/wayzhu/blog/1944532