unicode_requirements()
Returns Unicode library status and errors.
File
- core/includes/unicode.inc, line 13
- Provides Unicode-related conversions and operations.
Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | function unicode_requirements() { $libraries = array ( Unicode::STATUS_SINGLEBYTE => t( 'Standard PHP' ), Unicode::STATUS_MULTIBYTE => t( 'PHP Mbstring Extension' ), Unicode::STATUS_ERROR => t( 'Error' ), ); $severities = array ( Unicode::STATUS_SINGLEBYTE => REQUIREMENT_WARNING, Unicode::STATUS_MULTIBYTE => NULL, Unicode::STATUS_ERROR => REQUIREMENT_ERROR, ); $failed_check = Unicode::check(); $library = Unicode::getStatus(); $requirements [ 'unicode' ] = array ( 'title' => t( 'Unicode library' ), 'value' => $libraries [ $library ], 'severity' => $severities [ $library ], ); switch ( $failed_check ) { case 'mb_strlen' : $requirements [ 'unicode' ][ 'description' ] = t( 'Operations on Unicode strings are emulated on a best-effort basis. Install the <a href="http://php.net/mbstring">PHP mbstring extension</a> for improved Unicode support.' ); break ; case 'mbstring.func_overload' : $requirements [ 'unicode' ][ 'description' ] = t( 'Multibyte string function overloading in PHP is active and must be disabled. Check the php.ini <em>mbstring.func_overload</em> setting. Please refer to the <a href="http://php.net/mbstring">PHP mbstring documentation</a> for more information.' ); break ; case 'mbstring.encoding_translation' : $requirements [ 'unicode' ][ 'description' ] = t( 'Multibyte string input conversion in PHP is active and must be disabled. Check the php.ini <em>mbstring.encoding_translation</em> setting. Please refer to the <a href="http://php.net/mbstring">PHP mbstring documentation</a> for more information.' ); break ; case 'mbstring.http_input' : $requirements [ 'unicode' ][ 'description' ] = t( 'Multibyte string input conversion in PHP is active and must be disabled. Check the php.ini <em>mbstring.http_input</em> setting. Please refer to the <a href="http://php.net/mbstring">PHP mbstring documentation</a> for more information.' ); break ; case 'mbstring.http_output' : $requirements [ 'unicode' ][ 'description' ] = t( 'Multibyte string output conversion in PHP is active and must be disabled. Check the php.ini <em>mbstring.http_output</em> setting. Please refer to the <a href="http://php.net/mbstring">PHP mbstring documentation</a> for more information.' ); break ; } return $requirements ; } |
Please login to continue.