<?php
/***************************************************************************
- * Copyright (C) 2003-2006 Polytechnique.org *
+ * Copyright (C) 2003-2007 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
function _list_header_decode($charset, $c, $str) {
$s = ($c == 'Q' || $c == 'q') ? quoted_printable_decode($str) : base64_decode($str);
- $s = iconv($charset, 'iso-8859-15', $s);
+ $s = iconv($charset, 'UTF-8', $s);
return str_replace('_', ' ', $s);
}
function list_header_decode($value) {
+ if (!$value) {
+ return "[pas de sujet]";
+ }
$val = preg_replace('/(=\?[^?]*\?[BQbq]\?[^?]*\?=) (=\?[^?]*\?[BQbq]\?[^?]*\?=)/', '\1\2', $value);
return preg_replace('/=\?([^?]*)\?([BQbq])\?([^?]*)\?=/e', '_list_header_decode("\1", "\2", "\3")', $val);
}
// }}}
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
?>