Documentation TYPO3 par Ameos |
Public Member Functions | |
parse_charset ($charset) | |
get_locale_charset ($locale) | |
conv ($str, $fromCS, $toCS, $useEntityForNoChar=0) | |
convArray (&$array, $fromCS, $toCS, $useEntityForNoChar=0) | |
utf8_encode ($str, $charset) | |
utf8_decode ($str, $charset, $useEntityForNoChar=0) | |
utf8_to_entities ($str) | |
entities_to_utf8 ($str, $alsoStdHtmlEnt=0) | |
utf8_to_numberarray ($str, $convEntities=0, $retChar=0) | |
UnumberToChar ($cbyte) | |
utf8CharToUnumber ($str, $hex=0) | |
initCharset ($charset) | |
initUnicodeData ($mode=null) | |
initCaseFolding ($charset) | |
initToASCII ($charset) | |
substr ($charset, $string, $start, $len=null) | |
strlen ($charset, $string) | |
crop ($charset, $string, $len, $crop='') | |
strtrunc ($charset, $string, $len) | |
conv_case ($charset, $string, $case) | |
specCharsToASCII ($charset, $string) | |
sb_char_mapping ($str, $charset, $mode, $opt='') | |
utf8_substr ($str, $start, $len=null) | |
utf8_strlen ($str) | |
utf8_strtrunc ($str, $len) | |
utf8_strpos ($haystack, $needle, $offset=0) | |
utf8_strrpos ($haystack, $needle) | |
utf8_char2byte_pos ($str, $pos) | |
utf8_byte2char_pos ($str, $pos) | |
utf8_char_mapping ($str, $mode, $opt='') | |
euc_strtrunc ($str, $len, $charset) | |
euc_substr ($str, $start, $charset, $len=null) | |
euc_strlen ($str, $charset) | |
euc_char2byte_pos ($str, $pos, $charset) | |
euc_char_mapping ($str, $charset, $mode, $opt='') | |
Public Attributes | |
$noCharByteVal = 63 | |
$parsedCharsets = array() | |
$caseFolding = array() | |
$toASCII = array() | |
$twoByteSets | |
$fourByteSets | |
$eucBasedSets | |
$synonyms | |
$lang_to_script | |
$script_to_charset_unix | |
$script_to_charset_windows | |
$locale_to_charset | |
$charSetArray | |
$isoArray |
Definition at line 136 of file class.t3lib_cs.php.
|
Convert from one charset to another charset.
Definition at line 599 of file class.t3lib_cs.php. References utf8_decode(), and utf8_encode(). Referenced by convArray(). |
|
Translates all characters of a string into their respective case values. Unlike strtolower() and strtoupper() this method is locale independent. Note that the string length may change! eg. lower case German �(sharp S) becomes upper case "SS" Unit-tested by Kasper Real case folding is language dependent, this method ignores this fact.
Definition at line 1540 of file class.t3lib_cs.php. |
|
Convert all elements in ARRAY from one charset to another charset. NOTICE: Array is passed by reference!
Definition at line 639 of file class.t3lib_cs.php. References conv(). |
|
Truncates a string and pre-/appends a string. Unit tested by Kasper
Definition at line 1453 of file class.t3lib_cs.php. |
|
Converts numeric entities (UNICODE, eg. decimal (Ӓ) or hexadecimal (&x1b;)) to UTF-8 multibyte chars
Definition at line 778 of file class.t3lib_cs.php. |
|
Translates a character position into an 'absolute' byte position.
Definition at line 2005 of file class.t3lib_cs.php. |
|
Maps all characters of a string in the EUC charset family.
Definition at line 2046 of file class.t3lib_cs.php. |
|
Counts the number of characters of a string in the EUC charset family.
Definition at line 1978 of file class.t3lib_cs.php. |
|
Cuts a string in the EUC charset family short at a given byte length.
Definition at line 1924 of file class.t3lib_cs.php. |
|
Returns a part of a string in the EUC charset family.
Definition at line 1953 of file class.t3lib_cs.php. |
|
Get the charset of a locale. ln language ln_CN language / country ln_CN.cs language / country / charset ln_CN.cs language / country / charset / modifier
Definition at line 546 of file class.t3lib_cs.php. References parse_charset(). |
|
This function initializes the folding table for a charset other than UTF-8. This function is automatically called by the case folding functions.
Definition at line 1237 of file class.t3lib_cs.php. References t3lib_div::getFileAbsFileName(). |
|
This will initialize a charset for use if it's defined in the PATH_t3lib.'csconvtbl/' folder This function is automatically called by the conversion functions PLEASE SEE: http://www.unicode.org/Public/MAPPINGS/
Definition at line 950 of file class.t3lib_cs.php. References t3lib_div::getFileAbsFileName(), t3lib_div::trimExplode(), t3lib_div::validPathStr(), and t3lib_div::writeFileToTypo3tempDir(). Referenced by utf8_encode(). |
|
This function initializes the to-ASCII conversion table for a charset other than UTF-8. This function is automatically called by the ASCII transliteration functions.
Definition at line 1299 of file class.t3lib_cs.php. References t3lib_div::getFileAbsFileName(), and t3lib_div::writeFileToTypo3tempDir(). |
|
This function initializes all UTF-8 character data tables. PLEASE SEE: http://www.unicode.org/Public/UNIDATA/
Definition at line 1012 of file class.t3lib_cs.php. References t3lib_div::getFileAbsFileName(), t3lib_div::trimExplode(), t3lib_div::validPathStr(), and t3lib_div::writeFileToTypo3tempDir(). |
|
Normalize - changes input character set to lowercase letters.
Definition at line 527 of file class.t3lib_cs.php. Referenced by get_locale_charset(). |
|
Maps all characters of a string in a single byte charset.
Definition at line 1606 of file class.t3lib_cs.php. |
|
Converts special chars (like ���, umlauts etc) to ascii equivalents (usually double-bytes, like �=> ae etc.)
Definition at line 1566 of file class.t3lib_cs.php. |
|
Counts the number of characters. Unit-tested by Kasper (single byte charsets only)
Definition at line 1423 of file class.t3lib_cs.php. Referenced by utf8_encode(). |
|
Cuts a string short at a given byte length.
Definition at line 1506 of file class.t3lib_cs.php. |
|
Returns a part of a string. Unit-tested by Kasper (single byte charsets only)
Definition at line 1370 of file class.t3lib_cs.php. Referenced by utf8_encode(). |
|
Converts a UNICODE number to a UTF-8 multibyte character Algorithm based on script found at From: http://czyborra.com/utf/ Unit-tested by Kasper The binary representation of the character's integer value is thus simply spread across the bytes and the number of high bits set in the lead byte announces the number of bytes in the multibyte sequence: bytes | bits | representation 1 | 7 | 0vvvvvvv 2 | 11 | 110vvvvv 10vvvvvv 3 | 16 | 1110vvvv 10vvvvvv 10vvvvvv 4 | 21 | 11110vvv 10vvvvvv 10vvvvvv 10vvvvvv 5 | 26 | 111110vv 10vvvvvv 10vvvvvv 10vvvvvv 10vvvvvv 6 | 31 | 1111110v 10vvvvvv 10vvvvvv 10vvvvvv 10vvvvvv 10vvvvvv
Definition at line 862 of file class.t3lib_cs.php. |
|
Translates an 'absolute' byte position into a character position. Unit tested by Kasper.
Definition at line 1825 of file class.t3lib_cs.php. |
|
Translates a character position into an 'absolute' byte position. Unit tested by Kasper.
Definition at line 1784 of file class.t3lib_cs.php. |
|
Maps all characters of an UTF-8 string.
Definition at line 1848 of file class.t3lib_cs.php. |
|
Converts $str from UTF-8 to $charset
Definition at line 702 of file class.t3lib_cs.php. Referenced by conv(). |
|
Converts $str from $charset to UTF-8
Definition at line 656 of file class.t3lib_cs.php. References initCharset(), strlen(), and substr(). Referenced by conv(). |
|
Counts the number of characters of a string in UTF-8. Unit-tested by Kasper and works 100% like strlen() / mb_strlen()
Definition at line 1694 of file class.t3lib_cs.php. |
|
Find position of first occurrence of a string, both arguments are in UTF-8.
Definition at line 1737 of file class.t3lib_cs.php. |
|
Find position of last occurrence of a char in a string, both arguments are in UTF-8.
Definition at line 1762 of file class.t3lib_cs.php. |
|
Truncates a string in UTF-8 short at a given byte length.
Definition at line 1715 of file class.t3lib_cs.php. |
|
Returns a part of a UTF-8 string. Unit-tested by Kasper and works 100% like substr() / mb_substr() for full range of $start/$len
Definition at line 1661 of file class.t3lib_cs.php. |
|
Converts all chars > 127 to numeric entities.
Definition at line 745 of file class.t3lib_cs.php. |
|
Converts all chars in the input UTF-8 string into integer numbers returned in an array
Definition at line 812 of file class.t3lib_cs.php. |
|
Converts a UTF-8 Multibyte character to a UNICODE number Unit-tested by Kasper
Definition at line 907 of file class.t3lib_cs.php. |
|
Initial value: array( 'gb2312'=>1, // Chinese, simplified. 'big5'=>1, // Chinese, traditional. 'euc-kr'=>1, // Korean 'shift_jis'=>1, // Japanese - WARNING: Shift-JIS includes half-width katakana single-bytes characters above 0x80! ) Definition at line 160 of file class.t3lib_cs.php. |
|
Initial value: array( 'ucs-4'=>1, // 4-byte Unicode 'utf-32'=>1, // 4-byte Unicode (limited to the 21-bits of UTF-16) ) Definition at line 154 of file class.t3lib_cs.php. |
|
Initial value: array( 'ba' => 'bs', 'br' => 'pt_BR', 'ch' => 'zh_CN', 'cz' => 'cs', 'dk' => 'da', 'si' => 'sl', 'se' => 'sv', 'gl' => 'kl', 'gr' => 'el', 'hk' => 'zh_HK', 'kr' => 'ko', 'ua' => 'uk', 'jp' => 'ja', 'vn' => 'vi', ) Definition at line 503 of file class.t3lib_cs.php. |
|
Initial value: array( 'japanese.euc' => 'euc-jp', 'ja_jp.ujis' => 'euc-jp', 'korean.euc' => 'euc-kr', 'sr@Latn' => 'iso-8859-2', 'zh_cn' => 'gb2312', 'zh_hk' => 'big5', 'zh_tw' => 'big5', ) Definition at line 441 of file class.t3lib_cs.php. |
|
Initial value: array( 'west_european' => 'iso-8859-1', 'estonian' => 'iso-8859-1', 'east_european' => 'iso-8859-2', 'baltic' => 'iso-8859-4', 'cyrillic' => 'iso-8859-5', 'arabic' => 'iso-8859-6', 'greek' => 'iso-8859-7', 'hebrew' => 'iso-8859-8', 'turkish' => 'iso-8859-9', 'thai' => 'iso-8859-11', // = TIS-620 'lithuanian' => 'iso-8859-13', 'chinese' => 'gb2312', // = euc-cn 'japanese' => 'euc-jp', 'korean' => 'euc-kr', 'simpl_chinese' => 'gb2312', 'trad_chinese' => 'big5', 'vietnamese' => '', 'unicode' => 'utf-8', ) Definition at line 398 of file class.t3lib_cs.php. |
|
Initial value: array( 'east_european' => 'windows-1250', 'cyrillic' => 'windows-1251', 'west_european' => 'windows-1252', 'greek' => 'windows-1253', 'turkish' => 'windows-1254', 'hebrew' => 'windows-1255', 'arabic' => 'windows-1256', 'baltic' => 'windows-1257', 'estonian' => 'windows-1257', 'lithuanian' => 'windows-1257', 'vietnamese' => 'windows-1258', 'thai' => 'cp874', 'korean' => 'cp949', 'chinese' => 'gb2312', 'japanese' => 'shift_jis', 'simpl_chinese' => 'gb2312', 'trad_chinese' => 'big5', ) Definition at line 420 of file class.t3lib_cs.php. |
|
Initial value: array(
'ucs-2'=>1, // 2-byte Unicode
)
Definition at line 149 of file class.t3lib_cs.php. |