| | |
| | | |
| | | /* |
| | | +-----------------------------------------------------------------------+ |
| | | | program/include/rcube_csv2vcard.php | |
| | | | | |
| | | | This file is part of the Roundcube Webmail client | |
| | | | Copyright (C) 2008-2012, The Roundcube Dev Team | |
| | | | | |
| | |
| | | { |
| | | // Localize fields map |
| | | if ($lang && $lang != 'en_US') { |
| | | if (file_exists(INSTALL_PATH . "program/localization/$lang/csv2vcard.inc")) { |
| | | include INSTALL_PATH . "program/localization/$lang/csv2vcard.inc"; |
| | | if (file_exists(RCUBE_LOCALIZATION_DIR . "$lang/csv2vcard.inc")) { |
| | | include RCUBE_LOCALIZATION_DIR . "$lang/csv2vcard.inc"; |
| | | } |
| | | |
| | | if (!empty($map)) { |
| | |
| | | // convert to UTF-8 |
| | | $head = substr($csv, 0, 4096); |
| | | $fallback = rcube::get_instance()->config->get('default_charset', 'ISO-8859-1'); // fallback to Latin-1? |
| | | $charset = rcube_charset::detect($head, RCMAIL_CHARSET); |
| | | $charset = rcube_charset::detect($head, RCUBE_CHARSET); |
| | | $csv = rcube_charset::convert($csv, $charset); |
| | | $head = ''; |
| | | |