http://localhost/fw/api/fw_api.php?rule=unicode&action=create&phrase=යුනිකෝඩ්
I accessing the above url. In fw_api.php
, when I echo the
The actual value is actually "%E0%B6%BA%E0%B7%94%E0..."!
URLs must consist of a subset of ASCII, they cannot contain other "Unicode characters". Your browser may be so nice as to let you input arbitrary Unicode characters and actually display them as characters, but behind the scenes the URL value is percent encoded. You'll have to decode it with rawurldecode.
The query string is automatically being parsed and decoded by PHP and placed in the $_GET
array (and $_POST
for the request body). But the raw query string you'll have to parse and decode yourself.