http_negotiate_charset()
http_negotiate_charset - Negotiate clients preferred character set
Syntax
string http_negotiate_charset (
array $supported,
array &$result)
Arguments
- supported - array containing the supported charsets as values
- result - will be filled with an array containing the negotiation results
Description
This function negotiates the clients preferred charset based on its Accept-CharsetHTTP header. The qualifier is recognized and charsets without qualifier are rated highest.
Version
PHP PECL pecl_http >= 0.1.0
Return value
Returns the negotiated charset or the default charset (i.e. first array entry) if none match.