GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
KHTTP_URLENCODE(3) FreeBSD Library Functions Manual KHTTP_URLENCODE(3)

khttp_urlencode
URL encoding for kcgi

library “libkcgi”

#include <sys/types.h>
#include <stdarg.h>
#include <stdint.h>
#include <kcgi.h>

char *
khttp_urlencode(const char *cp);

Percent-encodes a string cp, usually for embedding in a URL, and returns the allocated result. If passed a NULL, returns an allocated empty string.

The encoding uses capital-letter hex encoding.

Returns a newly-allocated string that must be freed with free(3) or NULL if allocation fails.

The deprecated form of this function, kutil_urlencode(), should no longer be used.

The following table shows strings pre- and post-encoding.

foo bar foo+bar
foo+bar foo%2Bbar

Written by Kristaps Dzonsons <kristaps@bsd.lv>.
June 12, 2022 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.