The mail class seems to handle mails sent with Content-Transfer-Encoding: 8bit somewhat weirdly: It decodes them (to utf-8), changes the raw source to base64, and does not modify the Content-Type:charset= header. This leads to Discourse trying the message encoding (in my example ISO-8859-1) first, and if that does not contain any unparseable characters, it uses that. Sadly, in ISO-8859-1, every byte sequence is valid. Fix this by always trying to decode as UTF-8 first. The probability of someone using another encoding that cleanly (but wrongly) decodes as UTF-8 should be fairly low. |
||
|---|---|---|
| .. | ||
| components | ||
| controllers | ||
| fabricators | ||
| fixtures | ||
| helpers | ||
| integration | ||
| integrity | ||
| jobs | ||
| mailers | ||
| models | ||
| phantom_js | ||
| serializers | ||
| services | ||
| support | ||
| tasks | ||
| views/omniauth_callbacks | ||
| discourse_tagging_spec.rb | ||
| rails_helper.rb | ||