A.57 library(url): Analysing and constructing URL
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • The SWI-Prolog library
        • library(url): Analysing and constructing URL
          • global_url/3
          • is_absolute_url/1
          • http_location/2
          • parse_url/2
          • parse_url/3
          • www_form_encode/2
          • set_url_encoding/2
          • url_iri/2
          • parse_url_search/2
          • file_name_to_url/2
    • Packages
Availability::- use_module(library(url)).(can be autoloaded)
Source[det]www_form_encode(+Value, -XWWWFormEncoded)
[det]www_form_encode(-Value, +XWWWFormEncoded)
En/decode to/from application/x-www-form-encoded. Encoding encodes all characters except RFC 3986 unreserved (ASCII alnum (see code_type/2)), and one of "-._~" using percent encoding. Newline is mapped to %OD%OA. When decoding, newlines appear as a single newline (10) character.

Note that a space is encoded as %20 instead of +. Decoding decodes both to a space.

deprecated
Use uri_encoded/3 for new code.