| Did you know ... | Search Documentation: |
| Pack canny_tudor -- prolog/canny/url.pl |
URL encodes a Code. Uses the C-symbol code type (including letters, digits and underscores) conservatively to determine whether or not to encode to percentage-prefixed hexadecimal. Liberally decodes by accepting any code except the percentage code. Percents must decode with a pair of hexadecimal digits; decoding otherwise fails.
Examples:
?- url_coded(`Hello_World!`, Encoded).
Encoded = Hello_World%21.
?- url_coded(Decoded, `Hello_World%21`).
Decoded = `Hello_World!`.