From e1e285f144f2505c67140eda0923c11977a54c9d Mon Sep 17 00:00:00 2001 From: gustavf Date: Thu, 24 Feb 2000 09:44:36 +0000 Subject: [PATCH] Added partial support for iso-8859-15 to rfc1522Decode. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@243 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/mime.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/functions/mime.php b/functions/mime.php index aec16697..f891a3cd 100644 --- a/functions/mime.php +++ b/functions/mime.php @@ -213,10 +213,14 @@ $replace = quoted_printable_decode($replace); } - // Only US-ASCII and ISO-8859-1 can be displayed without further ado - if ($res[2] != "" && $res[2] != "1") { + if ($res[2] != "" && $res[2] == "15") { + // Remove all chararacters in iso-8859-15 that is not the same + // as in iso-8859-1 + $replace = strtr($replace, "\244\246\250\255\264\270\274\275". + "\276", "??????????"); + } else if ($res[2] != "" && $res[2] != "1") { // This gets rid of all characters with over 0x9F for other - // charsets. + // iso-8859 charsets. $replace = strtr($replace, "\240\241\242\243\244\245\246\247". "\250\251\252\253\254\255\256\257". "\260\261\262\263\264\265\266\267". -- 2.25.1