1curl_easy_unescape(3)           libcurl Manual           curl_easy_unescape(3)
2
3
4

NAME

6       curl_easy_unescape - URL decodes the given string
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       char  *curl_easy_unescape(  CURL *curl, const char *url , int inlength,
12       int *outlength );
13

DESCRIPTION

15       This function converts the given URL encoded input string to  a  "plain
16       string" and returns that in an allocated memory area. All input charac‐
17       ters that are URL encoded (%XX where XX is a two-digit hexadecimal num‐
18       ber) are converted to their binary versions.
19
20       If  the  length argument is set to 0 (zero), curl_easy_unescape(3) will
21       use strlen() on the input url string to find out the size.
22
23       If outlength is non-NULL, the function will write  the  length  of  the
24       returned  string  in  the  integer it points to. This allows an escaped
25       string containing %00 to still  get  used  properly  after  unescaping.
26       Since  this  is a pointer to an int type, it can only return a value up
27       to INT_MAX so no longer string can be unescaped if the string length is
28       returned in this parameter.
29
30       You must curl_free(3) the returned string when you're done with it.
31

AVAILABILITY

33       Added in 7.15.4 and replaces the old curl_unescape(3) function.
34

RETURN VALUE

36       A pointer to a null-terminated string or NULL if it failed.
37

SEE ALSO

39       curl_easy_escape(3), curl_free(3),RFC3986
40
41
42
43libcurl 7.71.1                   June 25, 2020           curl_easy_unescape(3)
Impressum