summaryrefslogtreecommitdiff
path: root/program/include
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-11-04 13:05:29 +0000
committeralecpl <alec@alec.pl>2010-11-04 13:05:29 +0000
commitb8d8cbda4535f76c468364ebbdb81d856ed8322c (patch)
tree341f21e8d0d259f62c4d41a6e1d951d0fc195c8c /program/include
parentbf13ba996ca5e33c8d1bfd88ed92d1c06b0a24c8 (diff)
- Skip conversion when input charset is BINARY
Diffstat (limited to 'program/include')
-rw-r--r--program/include/main.inc5
1 files changed, 4 insertions, 1 deletions
diff --git a/program/include/main.inc b/program/include/main.inc
index 242fb1ac3..4bf721336 100644
--- a/program/include/main.inc
+++ b/program/include/main.inc
@@ -197,7 +197,7 @@ function rcube_charset_convert($str, $from, $to=NULL)
static $mbstring_list = null;
static $convert_warning = false;
static $conv = null;
-
+
$error = false;
$to = empty($to) ? strtoupper(RCMAIL_CHARSET) : rcube_parse_charset($to);
@@ -341,6 +341,9 @@ function rcube_parse_charset($input)
'/^X-/', // X- prefix (e.g. X-ROMAN8 => ROMAN8)
), '', $charset);
+ if ($charset == 'BINARY')
+ return $charsets[$input] = null;
+
# Aliases: some of them from HTML5 spec.
$aliases = array(
'USASCII' => 'WINDOWS-1252',