Character sets conversion functionality
| package |
Framework |
|---|---|
| subpackage |
Core |
| author |
Thomas Bruederli roundcube@gmail.com |
| author |
Aleksander Machniak alec@alec.pl |
| author |
Edmund Grimley Evans edmundo@rano.org |
clean(mixed $input) : mixed
mixedString or array.
mixedString or array
convert(string $str, string $from, string $to = null) : string
Uses mbstring and iconv functions if possible
stringInput string
stringSuspected charset of the input string
stringTarget charset to convert to; defaults to RCUBE_CHARSET
stringConverted string
detect(string $string, string $failover = null, string $language = null) : string
stringString
stringDefault result for failover
stringUser language
stringCharset name
error_handler(integer $errno, string $errstr)
integerLevel of the error
stringError message
parse_charset(string $input) : string
Sometimes charset string is malformed, there are also charset aliases but we need strict names for charset conversion (specially utf8 class)
stringInput charset name
stringThe validated charset name
utf16_to_utf8(string $str) : string
stringInput string
stringThe converted string
utf7_to_utf8(string $str) : string
stringInput string (UTF-7)
stringConverted string (UTF-8)
utf7imap_to_utf8(string $str) : string
If input data is invalid, return the original input string. RFC 2060 obviously intends the encoding to be unique (see point 5 in section 5.1.3), so we reject any non-canonical form, such as &ACY- (instead of &-) or &AMA-&AMA- (instead of &AMAAwA-).
Translated from C to PHP by Thomas Bruederli roundcube@gmail.com
stringInput string (UTF7-IMAP)
stringOutput string (UTF-8)
utf8_to_utf7imap(string $str) : string
Unicode characters above U+FFFF are replaced by U+FFFE. If input data is invalid, return an empty string.
Translated from C to PHP by Thomas Bruederli roundcube@gmail.com
stringInput string (UTF-8)
stringOutput string (UTF7-IMAP)
aliases :