| | |
| | | |
| | | /* |
| | | +-----------------------------------------------------------------------+ |
| | | | program/include/rcube_charset.php | |
| | | | | |
| | | | This file is part of the Roundcube Webmail client | |
| | | | Copyright (C) 2005-2012, The Roundcube Dev Team | |
| | | | Copyright (C) 2011-2012, Kolab Systems AG | |
| | |
| | | | | |
| | | | PURPOSE: | |
| | | | Provide charset conversion functionality | |
| | | | | |
| | | +-----------------------------------------------------------------------+ |
| | | | Author: Thomas Bruederli <roundcube@gmail.com> | |
| | | | Author: Aleksander Machniak <alec@alec.pl> | |
| | |
| | | * |
| | | * @param string Input string |
| | | * @param string Suspected charset of the input string |
| | | * @param string Target charset to convert to; defaults to RCMAIL_CHARSET |
| | | * @param string Target charset to convert to; defaults to RCUBE_CHARSET |
| | | * |
| | | * @return string Converted string |
| | | */ |
| | |
| | | static $mbstring_sch = null; |
| | | static $conv = null; |
| | | |
| | | $to = empty($to) ? RCMAIL_CHARSET : $to; |
| | | $to = empty($to) ? RCUBE_CHARSET : $to; |
| | | $from = self::parse_charset($from); |
| | | |
| | | // It is a common case when UTF-16 charset is used with US-ASCII content (#1488654) |