Percent-encoding and percent-decoding, by the percent-encode sets of the URL Standard, section 1.3.
Each set is a predicate of a code point, so a set of your own is a function too, e.g. (some-fn percent/path-set #{0x3B}). Every set of the standard holds the code points above U+007E.
TODO: the encodings other than UTF-8 that HTML passes to the parser for the query of a document in a legacy encoding.
Percent-encoding and percent-decoding, by the percent-encode sets of
the URL Standard, section 1.3.
Each set is a predicate of a code point, so a set of your own is a
function too, e.g. (some-fn percent/path-set #{0x3B}). Every set of the
standard holds the code points above U+007E.
TODO: the encodings other than UTF-8 that HTML passes to the parser for
the query of a document in a legacy encoding.The C0 control percent-encode set.
The C0 control percent-encode set.
The component percent-encode set, which encodes what JavaScript's encodeURIComponent encodes.
The component percent-encode set, which encodes what JavaScript's encodeURIComponent encodes.
(decode s)The text s with its percent-encoded bytes decoded as UTF-8, with
U+FFFD for each sequence that isn't UTF-8. A % that starts no
percent-encoded byte stays a %.
(decode "%E2%80%BD%25%2E")
;; => "‽%."
The text `s` with its percent-encoded bytes decoded as UTF-8, with
U+FFFD for each sequence that isn't UTF-8. A % that starts no
percent-encoded byte stays a %.
(decode "%E2%80%BD%25%2E")
;; => "‽%."(decode-bytes s)The bytes of the text s in UTF-8, with each percent-encoded byte
decoded, as a vector of numbers. A % that starts no percent-encoded byte
stays a %.
The bytes of the text `s` in UTF-8, with each percent-encoded byte decoded, as a vector of numbers. A % that starts no percent-encoded byte stays a %.
(encode s)(encode s set)The text s with each code point in the percent-encode set
percent-encoded as UTF-8. The set is component-set unless given.
(encode "Say what‽")
;; => "Say%20what%E2%80%BD"
With form-urlencoded-set a space becomes a +, as in the body of a form.
The text `s` with each code point in the percent-encode `set`
percent-encoded as UTF-8. The set is component-set unless given.
(encode "Say what‽")
;; => "Say%20what%E2%80%BD"
With form-urlencoded-set a space becomes a +, as in the body of a form.The application/x-www-form-urlencoded percent-encode set, which leaves only the ASCII letters and digits and * - . _ as they are. Encoding by it turns a space into a +.
The application/x-www-form-urlencoded percent-encode set, which leaves only the ASCII letters and digits and * - . _ as they are. Encoding by it turns a space into a +.
The fragment percent-encode set.
The fragment percent-encode set.
The special-query percent-encode set, for the query of a URL with a special scheme, e.g. https.
The special-query percent-encode set, for the query of a URL with a special scheme, e.g. https.
The userinfo percent-encode set.
The userinfo percent-encode set.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |