curl_easy_unescape(3) libcurl Manual curl_easy_unescape(3)NAME
curl_easy_unescape - URL decodes the given string
SYNOPSIS
#include <curl/curl.h>
char *curl_easy_unescape( CURL *curl, const char *url , int inlength, int *outlength );
DESCRIPTION
This function converts the given URL encoded input string to a "plain string" and returns that in an allocated memory area. All input char-
acters that are URL encoded (%XX where XX is a two-digit hexadecimal number) are converted to their binary versions.
If the length argument is set to 0 (zero), curl_easy_unescape(3) will use strlen() on the input url string to find out the size.
If outlength is non-NULL, the function will write the length of the returned string in the integer it points to. This allows an escaped
string containing %00 to still get used properly after unescaping. Since this is a pointer to an int type, it can only return a value up to
INT_MAX so no longer string can be unescaped if the string length is returned in this parameter.
You must curl_free(3) the returned string when you're done with it.
AVAILABILITY
Added in 7.15.4 and replaces the old curl_unescape(3) function.
RETURN VALUE
A pointer to a zero terminated string or NULL if it failed.
SEE ALSO curl_easy_escape(3), curl_free(3),RFC3986
libcurl 7.54.0 October 04, 2016 curl_easy_unescape(3)
Check Out this Related Man Page
curl_easy_unescape(3) libcurl Manual curl_easy_unescape(3)NAME
curl_easy_unescape - URL decodes the given string
SYNOPSIS
#include <curl/curl.h>
char *curl_easy_unescape( CURL *curl, char *url, int inlength , int *outlength );
DESCRIPTION
This function converts the given URL encoded input string to a "plain string" and returns that in an allocated memory area. All input char-
acters that are URL encoded (%XX where XX is a two-digit hexadecimal number) are converted to their binary versions.
If the length argument is set to 0 (zero), curl_easy_unescape(3) will use strlen() on the input url string to find out the size.
If outlength is non-NULL, the function will write the length of the returned string in the integer it points to. This allows an escaped
string containing %00 to still get used properly after unescaping.
You must curl_free(3) the returned string when you're done with it.
AVAILABILITY
Added in 7.15.4 and replaces the old curl_unescape(3) function.
RETURN VALUE
A pointer to a zero terminated string or NULL if it failed.
SEE ALSO curl_easy_escape(3), curl_free(3), RFC 2396
libcurl 7.15.4 7 April 2006 curl_easy_unescape(3)
Hi all,
I am trying to find the best way of making a change to 1 char in a string, the string can be between 1 and 14 characters.
I am reading a line in from a file which contains
012341231231:2:102939283:NNN: Require :NBN:
012838238232:3:372932:NNN: Require :NNB:
I need to change 1 N or a... (8 Replies)
Hi All
I want to take a Hexadecimal number as input and i want to find lenth of the input and pass it to char s ( char s ). I have a program to convert hexadecial to binary but it is taking limited input but i want to return binary number based on input. How? (1 Reply)
Hi all,
We use strlen() fun provided by library to find the length of a string.
Looking inside of it, it has some different mechanism to find the length of string.
Normally, we scan the string byte by byte until the '\0' character. It takes a logn time to count length.
The Library strlen()... (2 Replies)
Hi.
I 'm trying to hit a REST api and retrieve a JSON feed, and the URL has special characters in it.
Something like:
Example Domain
The below curl command is failing
curl -X GET https://www.example.com/?sample=name&id=1001
saying bad command at id=1001
I am going to use this as part... (3 Replies)
I realize this general issue (inputting strings of variable length in C) has been addressed in myriad locations before, but I'm interested in knowing why my specific approach is not working. (BTW I'm intentionally keeping the size increments small so that I can more easily follow what's going on.... (5 Replies)