From: x2000habouzit Date: Sun, 26 Sep 2004 15:53:39 +0000 (+0000) Subject: no more encoding issues with banana. oh yeah! X-Git-Tag: 1.8~369 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=d5b824ccc32c8231ce0f95795c555ce0403f6657;p=banana.git no more encoding issues with banana. oh yeah! --- diff --git a/include/post.inc.php b/include/post.inc.php index 463ff93..b232f73 100644 --- a/include/post.inc.php +++ b/include/post.inc.php @@ -35,6 +35,9 @@ class Post { (preg_match("/quoted-printable/",$this->headers->contentencoding))) { $this->body = quoted_printable_decode($this->body); } + if(preg_match('!charset=([^;]*);!', $this->headers->contenttype, $matches)) { + $this->body = iconv($matches[1], 'iso-8859-1', $this->body); + } } }