Moodle  2.2.1
http://www.collinsharper.com
TYPO3 Namespace Reference

Detailed Description

Class for conversion between charsets.

Id:
class.t3lib_cs.php,v 1.15 2011/10/27 17:26:27 moodlerobot Exp
Author:
Kasper Skårhøj <kasperYYYY@typo3.com>
Martin Kutschker <martin.t.kutschker@blackbox.net> [CLASS/FUNCTION INDEX of SCRIPT]

136: class t3lib_cs 488: function parse_charset($charset) 507: function get_locale_charset($locale)

SECTION: Charset Conversion functions 560: function conv($str,$fromCS,$toCS,$useEntityForNoChar=0) 600: function convArray(&$array,$fromCS,$toCS,$useEntityForNoChar=0) 617: function utf8_encode($str,$charset) 663: function utf8_decode($str,$charset,$useEntityForNoChar=0) 706: function utf8_to_entities($str) 739: function entities_to_utf8($str,$alsoStdHtmlEnt=0) 773: function utf8_to_numberarray($str,$convEntities=0,$retChar=0) 823: function UnumberToChar($cbyte) 868: function utf8CharToUnumber($str,$hex=0)

SECTION: Init functions 911: function initCharset($charset) 973: function initUnicodeData($mode=null) 1198: function initCaseFolding($charset) 1260: function initToASCII($charset)

SECTION: String operation functions 1331: function substr($charset,$string,$start,$len=null) 1384: function strlen($charset,$string) 1414: function crop($charset,$string,$len,$crop='') 1467: function strtrunc($charset,$string,$len) 1501: function conv_case($charset,$string,$case) 1527: function specCharsToASCII($charset,$string)

SECTION: Internal string operation functions 1567: function sb_char_mapping($str,$charset,$mode,$opt='')

SECTION: Internal UTF-8 string operation functions 1622: function utf8_substr($str,$start,$len=null) 1655: function utf8_strlen($str) 1676: function utf8_strtrunc($str,$len) 1698: function utf8_strpos($haystack,$needle,$offset=0) 1723: function utf8_strrpos($haystack,$needle) 1745: function utf8_char2byte_pos($str,$pos) 1786: function utf8_byte2char_pos($str,$pos) 1809: function utf8_char_mapping($str,$mode,$opt='')

SECTION: Internal EUC string operation functions 1885: function euc_strtrunc($str,$len,$charset) 1914: function euc_substr($str,$start,$charset,$len=null) 1939: function euc_strlen($str,$charset) 1966: function euc_char2byte_pos($str,$pos,$charset) 2007: function euc_char_mapping($str,$charset,$mode,$opt='')

TOTAL FUNCTIONS: 35 (This index is automatically created/updated by the extension "extdeveval") Notes on UTF-8

Functions working on UTF-8 strings:

  • strchr/strstr
  • strrchr
  • substr_count
  • implode/explode/join

Functions nearly working on UTF-8 strings:

  • strlen: returns the length in BYTES, if you need the length in CHARACTERS use utf8_strlen
  • trim/ltrim/rtrim: the second parameter 'charlist' won't work for characters not contained in 7-bit ASCII
  • strpos/strrpos: they return the BYTE position, if you need the CHARACTER position use utf8_strpos/utf8_strrpos
  • htmlentities: charset support for UTF-8 only since PHP 4.3.0
  • preg_*: Support compiled into PHP by default nowadays, but could be unavailable, need to use modifier

Functions NOT working on UTF-8 strings:

  • str*cmp
  • stristr
  • stripos
  • substr
  • strrev
  • split/spliti
  • ... Class for conversion between charsets
Author:
Kasper Skårhøj <kasperYYYY@typo3.com>
Martin Kutschker <martin.t.kutschker@blackbox.net>

t3lib

The legendary "t3lib_div" class - Miscellaneous functions for general purpose. Most of the functions does not relate specifically to TYPO3 However a section of functions requires certain TYPO3 features available See comments in the source. You are encouraged to use this library in your own scripts!

USE: The class is intended to be used without creating an instance of it. So: Don't instantiate - call functions with "t3lib_div::" prefixed the function name. So use t3lib_div::[method-name] to refer to the functions, eg. 't3lib_div::milliseconds()'

Author:
Kasper Skårhøj <kasperYYYY@typo3.com>

t3lib

 All Data Structures Namespaces Files Functions Variables Enumerations