WordPress.org

Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/utf8 uri encode

Description

Only alphanumerics and some special characters may be used in a URL (or URI, more on that difference elsewhere). This function will convert other characters to their Unicode values.

Usage

<?php utf8_uri_encode$utf8_string$length ?>

Parameters

$utf8_string
(string) (required)
Default: None
$length
(integer) (optional) Max length of the string
Default: 0

Return Values

(string) 
String with Unicode encoded for URI.

Examples

Notes

Change Log

Since: 1.5.0

Source File

utf8_uri_encode() is located in wp-includes/formatting.php.

Related

See also index of Function Reference and index of Template Tags.