Class HTMLPurifier_Encoder

Description

A UTF-8 specific character encoder that handles cleaning and transforming.

A UTF-8 specific character encoder that handles cleaning and transforming.

Located in /library/HTMLPurifier/Encoder.php (line 7)


	
			
Method Summary
static void cleanUTF8 ( $str, [ $force_php = false])
static void convertFromUTF8 ( $str,  $config,  $context)
static ASCII convertToASCIIDumbLossless ($str $str)
static void convertToUTF8 ( $str,  $config,  $context)
static Array testEncodingSupportsASCII (string $encoding, [bool $bypass = false])
static void unichr ( $code)
Methods
static method cleanUTF8 (line 47)

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.

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.

  • access: public
static void cleanUTF8 ( $str, [ $force_php = false])
  • $str
  • $force_php
static method convertFromUTF8 (line 293)

Converts a string from UTF-8 based on configuration.

Converts a string from UTF-8 based on configuration.

  • access: public
static void convertFromUTF8 ( $str,  $config,  $context)
  • $str
  • $config
  • $context
static method convertToASCIIDumbLossless (line 339)

Lossless (character-wise) conversion of HTML to ASCII

Lossless (character-wise) conversion of HTML to ASCII

  • return: encoded string with non-ASCII character entity-ized
  • access: public
static ASCII convertToASCIIDumbLossless ($str $str)
  • $str $str: UTF-8 string to be converted to ASCII
static method convertToUTF8 (line 266)

Converts a string to UTF-8 based on configuration.

Converts a string to UTF-8 based on configuration.

  • access: public
static void convertToUTF8 ( $str,  $config,  $context)
  • $str
  • $config
  • $context
static method testEncodingSupportsASCII (line 381)

This expensive function tests whether or not a given character encoding supports ASCII. fail this test, and require special processing. encodings shouldn't ever fail.

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.

  • return: of UTF-8 characters to their corresponding ASCII, which can be used to "undo" any overzealous iconv action.
  • access: public
static Array testEncodingSupportsASCII (string $encoding, [bool $bypass = false])
  • string $encoding: Encoding name to test, as per iconv format
  • bool $bypass: Whether or not to bypass the precompiled arrays.
static method unichr (line 226)

Translates a Unicode codepoint into its corresponding UTF-8 character.

Translates a Unicode codepoint into its corresponding UTF-8 character.

  • access: public
static void unichr ( $code)
  • $code

Documentation generated on Thu, 19 Jun 2008 18:49:08 -0400 by phpDocumentor 1.4.2