![]() ![]() ![]() Returns the character set for characters allowed in a host URL subcomponent. Is this safe or are there other differences in PHP urldecode which needs to be considered? What is the "correct" way to solve this? I assume I could simple define a custom char set which includes the + sign, but I am not sure if this might lead to other unexpected side effects. URLUserAllowedCharacterSet there a reason why PHP handles the + sign in this way? It seems that Swift does not consider the + sign in any of its build in (inverted) char sets: URLFragmentAllowedCharacterSet "#%^` ![]() $decodedData = urldecode($encodedData) // some text $encodedData = $receivedData // some+text Let encodedData = data.addingPercentEncoding(withAllowedCharacters. While this works fine most of the time, I know became aware that PHP urldecode handles the + sign differently than the Swift addingPercentEncoding and decodes the + to a space. I would like to send some URL encoded data from a Swift app to a PHP API where the data is decoded again. ![]()
0 Comments
Leave a Reply. |