|
Moodle
2.2.1
http://www.collinsharper.com
|
Static Public Member Functions | |
| static | muteErrorHandler () |
| static | cleanUTF8 ($str, $force_php=false) |
| static | unichr ($code) |
| static | convertToUTF8 ($str, $config, $context) |
| static | convertFromUTF8 ($str, $config, $context) |
| static | convertToASCIIDumbLossless ($str) |
| static | testEncodingSupportsASCII ($encoding, $bypass=false) |
A UTF-8 specific character encoder that handles cleaning and transforming.
Definition at line 7 of file Encoder.php.
| static cleanUTF8 | ( | $ | str, |
| $ | force_php = false |
||
| ) | [static] |
Cleans a UTF-8 string for well-formedness and SGML validity
It will parse according to UTF-8 and return a valid UTF8 string, with non-SGML codepoints excluded.
Definition at line 47 of file Encoder.php.

| static convertFromUTF8 | ( | $ | str, |
| $ | config, | ||
| $ | context | ||
| ) | [static] |
Converts a string from UTF-8 based on configuration.
Definition at line 299 of file Encoder.php.


| static convertToASCIIDumbLossless | ( | $ | str | ) | [static] |
Lossless (character-wise) conversion of HTML to ASCII
| $str | UTF-8 string to be converted to ASCII |
Definition at line 345 of file Encoder.php.

| static convertToUTF8 | ( | $ | str, |
| $ | config, | ||
| $ | context | ||
| ) | [static] |
Converts a string to UTF-8 based on configuration.
Definition at line 266 of file Encoder.php.


| static muteErrorHandler | ( | ) | [static] |
Error-handler that mutes errors, alternative to shut-up operator.
Definition at line 20 of file Encoder.php.
| static testEncodingSupportsASCII | ( | $ | encoding, |
| $ | bypass = false |
||
| ) | [static] |
This expensive function tests whether or not a given character encoding supports ASCII. 7/8-bit encodings like Shift_JIS will fail this test, and require special processing. Variable width encodings shouldn't ever fail.
| string | $encoding | Encoding name to test, as per iconv format |
| bool | $bypass | Whether or not to bypass the precompiled arrays. |
Definition at line 387 of file Encoder.php.

| static unichr | ( | $ | code | ) | [static] |
Translates a Unicode codepoint into its corresponding UTF-8 character.
Definition at line 226 of file Encoder.php.
