関数 _canonical_charset()
2014/12/11
_canonical_charset()
定義ファイル :/blog/wp-includes/functions.php 23
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | /** * Retrieve a canonical form of the provided charset appropriate for passing to PHP * functions such as htmlspecialchars() and charset html attributes. * * @since 3.6.0 * @access private * * @see http://core.trac.wordpress.org/ticket/23688 * * @param string $charset A charset name. * @return string The canonical form of the charset. */ function _canonical_charset( $charset ) { if ( 'UTF-8' === $charset || 'utf-8' === $charset || 'utf8' === $charset || 'UTF8' === $charset ) return 'UTF-8'; if ( 'ISO-8859-1' === $charset || 'iso-8859-1' === $charset || 'iso8859-1' === $charset || 'ISO8859-1' === $charset ) return 'ISO-8859-1'; return $charset; } |