\HTMLPurifier_Encoder
A UTF-8 specific character encoder that handles cleaning and transforming.
Synopsis
class HTMLPurifier_Encoder
{
- // methods
- private void __construct()
- public static void muteErrorHandler()
- public static void cleanUTF8()
- public static void unichr()
- public static void convertToUTF8()
- public static void convertFromUTF8()
- public static void convertToASCIIDumbLossless()
- public static Array testEncodingSupportsASCII()
Methods
public
- cleanUTF8() — Cleans a UTF-8 string for well-formedness and SGML validity
- convertFromUTF8() — Converts a string from UTF-8 based on configuration.
- convertToASCIIDumbLossless() — Lossless (character-wise) conversion of HTML to ASCII
- convertToUTF8() — Converts a string to UTF-8 based on configuration.
- muteErrorHandler() — Error-handler that mutes errors, alternative to shut-up operator.
- testEncodingSupportsASCII() — 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.
- unichr()