Go to the source code of this file.
Functions | |
codepointToUtf8 ($codepoint) | |
Some of these functions are adapted from places in MediaWiki. | |
hexSequenceToUtf8 ($sequence) | |
Take a series of space-separated hexadecimal numbers representing Unicode code points and return a UTF-8 string composed of those characters. | |
utf8ToHexSequence ($str) | |
Take a UTF-8 string and return a space-separated series of hex numbers representing Unicode code points. | |
utf8ToCodepoint ($char) | |
Determine the Unicode codepoint of a single-character UTF-8 sequence. | |
escapeSingleString ($string) | |
Escape a string for inclusion in a PHP single-quoted string literal. |
codepointToUtf8 | ( | $ | codepoint | ) |
Some of these functions are adapted from places in MediaWiki.
Should probably merge them for consistency.
$codepoint | Integer: |
Definition at line 39 of file UtfNormalUtil.php.
Referenced by hexSequenceToUtf8(), EnhancedChangesList::spacerArrow(), EditPage::unmakesafe(), and CleanUpTest::XtestAllChars().
escapeSingleString | ( | $ | string | ) |
Escape a string for inclusion in a PHP single-quoted string literal.
$string | String: string to be escaped. |
Definition at line 135 of file UtfNormalUtil.php.
hexSequenceToUtf8 | ( | $ | sequence | ) |
Take a series of space-separated hexadecimal numbers representing Unicode code points and return a UTF-8 string composed of those characters.
Used by UTF-8 data generation and testing routines.
$sequence | String |
Definition at line 64 of file UtfNormalUtil.php.
References $n, and codepointToUtf8().
utf8ToCodepoint | ( | $ | char | ) |
Determine the Unicode codepoint of a single-character UTF-8 sequence.
Does not check for invalid input data.
$char | String |
Definition at line 95 of file UtfNormalUtil.php.
References $i.
Referenced by Language::firstChar().
utf8ToHexSequence | ( | $ | str | ) |
Take a UTF-8 string and return a space-separated series of hex numbers representing Unicode code points.
For debugging.
$str | String: UTF-8 string. |
Definition at line 81 of file UtfNormalUtil.php.