[diapublication avec suivi]
Le 26/10/2020 à 17:11, yamo' a écrit :
>
> Je garde la liste suivante pour mémoire :
>
>>> Bug #1 (e.g. MicroPlanet-Gravity/2.9.15)
>>> Some old or misconfigured newsreaders post articles with 8-bit characters
>>> in the headers when there should be only ASCII. This is a problem because
>>> there is no foolproof way to guess which charset was used.
>>> Workaround #1
>>> The most commonly encountered character set for this bug, at least on
>>> usenet-fr, is CP1252 (Windows Latin1) which is a superset of ISO-8859-1
>>> (ISO Latin1). However, UTF-8 is usually so easy to recognize that we
>>> first assume the text is un UTF-8. If this assumption fails, we then
>>> convert from CP1252. This probably covers over 99% of cases. Anyway, the
>>> main thing is to have a unique character set in the end, which is UTF-8.
>>>
>>> Bug #2 (e.g. SeaMonkey/2.49.4 or Thunderbird/68.12.1)
>>> In quoted-printable encoding, use lower case hexadecimal digits 'a'
>>> through 'f' instead of upper case 'A' through 'F'.
>>> Workaround #2
>>> Ignore the case of hexadecimal digits when decoding quoted-printable.
>>>
>>> Bug #3 (e.g. MicroPlanet-Gravity/3.0.4)
>>> Have an unencoded '?' within a quoted-printable encoded-word. It should
>>> normally be encoded as '=3F'.
>>> Workaround #3
>>> Accept to find an unencoded '?' in the 'encoded-text' part.
>>>
>>> Bug #4 (e.g. NewsPortal/0.50.1)
>>> Have headers lines with at least one MIME encoded-word where the length
>>> of the line is greater than 76. This was sometimes the case for the
>>> first line of a multiline header.
>>> Workaround #4
>>> Don't care about the length of header lines.
>>>
>>> Bug #5 (e.g. MesNews/
1.08.06.00)
>>> Violation of the rule that each encoded-word must represent an integral
>>> number of characters.
>>> Workaround #5
>>> Concatenate the encoded-text parts of multiple adjacent encoded-words
>>> with the same charset, before interpreting the result according to
>>> this charset.
>
> Celui là n'est peut-être pas encore totalement corrigé (à l'affichage
> j'ai des choses étonnantes.
> [...]
J'ai trouvé.
En attendant une refonte plus complète parce que le code est plein de
rustines pas belles (et peut-être buguées), voici ce qu'il faut faire
dans newsportal.php.
1) Remplacer l'horrRRRIble fonction headerDecode() par :
=====================================================
function headerDecode($value) {
return "" . new MimeDecodeHeader($value);
}
=====================================================
2) Supprimer la fonction want_translit() qui ne sert plus à rien.
[suivi vers fr.comp.lang.php]