eZPublish  3.9
eZTextCodec Class Reference

Handles conversion from one charset to another. More...

+ Inheritance diagram for eZTextCodec:

Public Member Functions

 conversionRequired ()
 
 convertCodepage ($str)
 
 convertCodepageMapper ($str)
 
 convertCodepageRev ($str)
 
 convertCodepageToUnicode ($str)
 
 convertMBString ($str)
 
 convertNone ($str)
 
 convertNoneToUnicode ($str)
 
 convertString ($str)
 
 convertUnicodeToCodepage ($unicodeValues)
 
 convertUnicodeToUTF8 ($unicodeValues)
 
 convertUTF8ToUnicode ($str)
 
 eZTextCodec ($inputCharsetCode, $outputCharsetCode, $realInputCharsetCode, $realOutputCharsetCode, $inputEncoding, $outputEncoding)
 
 initializeCodepageMapper ()
 
 initializeConversionFunction ($encodingConvertInitMap, $encodingConvertInitFunction)
 
 initializeInputCodepage ()
 
 initializeOutputCodepage ()
 
 inputCharsetCode ()
 
 outputCharsetCode ()
 
 requestedInputCharsetCode ()
 
 requestedOutputCharsetCode ()
 
 setUseMBString ($use)
 
 strlen ($str)
 
 strlenCodepage ($str)
 
 strlenCodepageMapper ($str)
 
 strlenCodepageRev ($str)
 
 strlenMBString ($str)
 
 strlenNone ($str)
 
 strlenUnicode ($unicodeValues)
 
 strlenUTF8 ($str)
 
 useMBString ()
 

Static Public Member Functions

 httpCharset ()
 
instance ($inputCharsetCode, $outputCharsetCode=false, $alwaysReturn=true)
 
 internalCharset ()
 
 updateSettings ($settings)
 

Detailed Description

Handles conversion from one charset to another.

Supports utf8 encoding/decoding

Member Function Documentation

eZTextCodec::conversionRequired ( )

/

Returns
true if a conversion is required, if false there's no need to call the textcodec functions.
eZTextCodec::convertCodepage (   $str)
eZTextCodec::convertCodepageMapper (   $str)
eZTextCodec::convertCodepageRev (   $str)
eZTextCodec::convertCodepageToUnicode (   $str)
eZTextCodec::convertMBString (   $str)
eZTextCodec::convertNone (   $str)
eZTextCodec::convertNoneToUnicode (   $str)
Returns
an empty array since no conversion is possible.
eZTextCodec::convertString (   $str)
eZTextCodec::convertUnicodeToCodepage (   $unicodeValues)
eZTextCodec::convertUnicodeToUTF8 (   $unicodeValues)
eZTextCodec::convertUTF8ToUnicode (   $str)
eZTextCodec::eZTextCodec (   $inputCharsetCode,
  $outputCharsetCode,
  $realInputCharsetCode,
  $realOutputCharsetCode,
  $inputEncoding,
  $outputEncoding 
)
eZTextCodec::httpCharset ( )
static
Returns
a charset value which can be used in HTTP headers.
Note
Will return the internalCharset() if not http charset is set.
eZTextCodec::initializeCodepageMapper ( )
eZTextCodec::initializeConversionFunction (   $encodingConvertInitMap,
  $encodingConvertInitFunction 
)

Referenced by eZTextCodec().

eZTextCodec::initializeInputCodepage ( )
eZTextCodec::initializeOutputCodepage ( )
eZTextCodec::inputCharsetCode ( )
& eZTextCodec::instance (   $inputCharsetCode,
  $outputCharsetCode = false,
  $alwaysReturn = true 
)
static
Returns
a text codec instance which can be used to convert from input charset $inputCharsetCode and into output charset $outputCharsetCode.
Parameters
$inputCharsetCodeIf false the internal charset it used, otherwise it is used directly
$outputCharsetCodeIf false the internal charset it used, otherwise it is used directly
$alwaysReturnIf false it will only return a textcodec instance if it is required for the input and output charset. In which case it returns null.

Referenced by eZURI\convertFilterString(), eZXMLInputParser\convertNumericEntities(), eZMail\convertText(), eZXML\domTree(), eZMail\encodeMimeHeader(), eZCodeMapper\executeCommandCode(), eZDBInterface\eZDBInterface(), eZAlphabetOperator\fetchAlphabet(), eZCodeMapper\generateCharsetMappingTable(), eZTSTranslator\handleMessageNode(), eZTemplateFileResource\handleResourceData(), eZPDF\modify(), eZTemplateStringOperator\modify(), eZINI\parseFile(), eZCodeMapper\parseTransformationFile(), eZXMLTextType\rawXMLText(), eZWebDAVServer\recode(), eZDOMDocument\toString(), and eZStringType\validateStringHTTPInput().

eZTextCodec::outputCharsetCode ( )
eZTextCodec::requestedInputCharsetCode ( )
eZTextCodec::requestedOutputCharsetCode ( )
eZTextCodec::setUseMBString (   $use)
eZTextCodec::strlen (   $str)
eZTextCodec::strlenCodepage (   $str)
eZTextCodec::strlenCodepageMapper (   $str)
eZTextCodec::strlenCodepageRev (   $str)
eZTextCodec::strlenMBString (   $str)
eZTextCodec::strlenNone (   $str)
eZTextCodec::strlenUnicode (   $unicodeValues)
eZTextCodec::strlenUTF8 (   $str)
eZTextCodec::updateSettings (   $settings)
static

Initializes the eZTextCodec settings to the ones in the array $settings.

See Also
internalCharset, httpCharset.

Referenced by eZUpdateTextCodecSettings(), and eZScript\updateTextCodecSettings().

eZTextCodec::useMBString ( )

Referenced by eZTextCodec().


The documentation for this class was generated from the following file: