If I encode a string like this:
var escapedString = originalString.stringByAddingPercentEscapesUsingEncoding(NSUTF8StringEncoding)
it does
Everything is same
var str = CFURLCreateStringByAddingPercentEscapes( nil, "test/test", nil, "!*'();:@&=+$,/?%#[]", CFStringBuiltInEncodings.UTF8.rawValue ) // test%2Ftest