WordPress at a glance
function is not described

_canonical_charset() WP 3.6.0

Retrieve a canonical form of the provided charset appropriate for passing to PHP functions such as htmlspecialchars() and charset html attributes.

No Hooks.

Return

String. The canonical form of the charset.

Usage

_canonical_charset( $charset );
$charset(string) (required)
A charset name.

Code of canonical charset: wp-includes/functions.php VER 5.1.1

<?php
function _canonical_charset( $charset ) {
	if ( 'utf-8' === strtolower( $charset ) || 'utf8' === strtolower( $charset ) ) {

		return 'UTF-8';
	}

	if ( 'iso-8859-1' === strtolower( $charset ) || 'iso8859-1' === strtolower( $charset ) ) {

		return 'ISO-8859-1';
	}

	return $charset;
}