Changeset 58147 for trunk/src/wp-includes/functions.php
- Timestamp:
- 05/14/2024 06:03:43 PM (2 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/functions.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.php
r58130 r58147 7475 7475 * @see https://core.trac.wordpress.org/ticket/23688 7476 7476 * 7477 * @param string $charset A charset name .7477 * @param string $charset A charset name, e.g. "UTF-8", "Windows-1252", "SJIS". 7478 7478 * @return string The canonical form of the charset. 7479 7479 */ 7480 7480 function _canonical_charset( $charset ) { 7481 if ( 'utf-8' === strtolower( $charset ) || 'utf8' === strtolower( $charset ) ) { 7482 7481 if ( is_utf8_charset( $charset ) ) { 7483 7482 return 'UTF-8'; 7484 7483 } 7485 7484 7486 if ( 'iso-8859-1' === strtolower( $charset ) || 'iso8859-1' === strtolower( $charset ) ) { 7487 7485 /* 7486 * Normalize the ISO-8859-1 family of languages. 7487 * 7488 * This is not required for htmlspecialchars(), as it properly recognizes all of 7489 * the input character sets that here are transformed into "ISO-8859-1". 7490 * 7491 * @todo Should this entire check be removed since it's not required for the stated purpose? 7492 * @todo Should WordPress transform other potential charset equivalents, such as "latin1"? 7493 */ 7494 if ( 7495 ( 0 === strcasecmp( 'iso-8859-1', $charset ) ) || 7496 ( 0 === strcasecmp( 'iso8859-1', $charset ) ) 7497 ) { 7488 7498 return 'ISO-8859-1'; 7489 7499 }
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)