API - XOOPS 2.5.11 Beta 2
By monxoops.fr
Iconv Class Reference

Static Public Member Functions

static iconv ($inCharset, $outCharset, $str)
 
static iconv_mime_decode_headers ($str, $mode=0, $charset=null)
 
static iconv_mime_decode ($str, $mode=0, $charset=null)
 
static iconv_get_encoding ($type='all')
 
static iconv_set_encoding ($type, $charset)
 
static iconv_mime_encode ($fieldName, $fieldValue, $pref=null)
 
static iconv_strlen ($s, $encoding=null)
 
static strlen1 ($s, $encoding=null)
 
static strlen2 ($s, $encoding=null)
 
static iconv_strpos ($haystack, $needle, $offset=0, $encoding=null)
 
static iconv_strrpos ($haystack, $needle, $encoding=null)
 
static iconv_substr ($s, $start, $length=2147483647, $encoding=null)
 

Data Fields

const ERROR_ILLEGAL_CHARACTER = 'iconv(): Detected an illegal character in input string'
 
const ERROR_WRONG_CHARSET = 'iconv(): Wrong charset, conversion from `%s\' to `%s\' is not allowed'
 

Static Public Attributes

static $inputEncoding = 'utf-8'
 
static $outputEncoding = 'utf-8'
 
static $internalEncoding = 'utf-8'
 

Detailed Description

iconv implementation in pure PHP, UTF-8 centric.

Implemented:

  • iconv - Convert string to requested character encoding
  • iconv_mime_decode - Decodes a MIME header field
  • iconv_mime_decode_headers - Decodes multiple MIME header fields at once
  • iconv_get_encoding - Retrieve internal configuration variables of iconv extension
  • iconv_set_encoding - Set current setting for character encoding conversion
  • iconv_mime_encode - Composes a MIME header field
  • iconv_strlen - Returns the character count of string
  • iconv_strpos - Finds position of first occurrence of a needle within a haystack
  • iconv_strrpos - Finds the last occurrence of a needle within a haystack
  • iconv_substr - Cut out part of a string

Charsets available for conversion are defined by files in the charset/ directory and by Iconv::$alias below. You're welcome to send back any addition you make.

Author
Nicolas Grekas p@tch.nosp@m.work.nosp@m..com

Member Function Documentation

◆ iconv()

static iconv (   $inCharset,
  $outCharset,
  $str 
)
static
Here is the caller graph for this function:

◆ iconv_get_encoding()

static iconv_get_encoding (   $type = 'all')
static

◆ iconv_mime_decode()

static iconv_mime_decode (   $str,
  $mode = 0,
  $charset = null 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ iconv_mime_decode_headers()

static iconv_mime_decode_headers (   $str,
  $mode = 0,
  $charset = null 
)
static
Here is the call graph for this function:

◆ iconv_mime_encode()

static iconv_mime_encode (   $fieldName,
  $fieldValue,
  $pref = null 
)
static

◆ iconv_set_encoding()

static iconv_set_encoding (   $type,
  $charset 
)
static

◆ iconv_strlen()

static iconv_strlen (   $s,
  $encoding = null 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ iconv_strpos()

static iconv_strpos (   $haystack,
  $needle,
  $offset = 0,
  $encoding = null 
)
static
Here is the call graph for this function:

◆ iconv_strrpos()

static iconv_strrpos (   $haystack,
  $needle,
  $encoding = null 
)
static
Here is the call graph for this function:

◆ iconv_substr()

static iconv_substr (   $s,
  $start,
  $length = 2147483647,
  $encoding = null 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ strlen1()

static strlen1 (   $s,
  $encoding = null 
)
static
Here is the caller graph for this function:

◆ strlen2()

static strlen2 (   $s,
  $encoding = null 
)
static
Here is the caller graph for this function:

Field Documentation

◆ $inputEncoding

$inputEncoding = 'utf-8'
static

◆ $internalEncoding

$internalEncoding = 'utf-8'
static

◆ $outputEncoding

$outputEncoding = 'utf-8'
static

◆ ERROR_ILLEGAL_CHARACTER

const ERROR_ILLEGAL_CHARACTER = 'iconv(): Detected an illegal character in input string'

◆ ERROR_WRONG_CHARSET

const ERROR_WRONG_CHARSET = 'iconv(): Wrong charset, conversion from `%s\' to `%s\' is not allowed'

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